Script to bring to front or send to back

About advanced scenes, and the Thyme scripting language used in Algodoo.

Script to bring to front or send to back

Postby keithg1229 » Fri May 04, 2018 4:45 am

Hey y'all. I created a script to add circles with tracers, but tracers always appear in front of circle. I tried setting the Zdepth but it doesn't change the appearance. Is there script that mimics "selection->move selected object to front"? Any help is appreciated. Thanks.
keithg1229
 
Posts: 3
Joined: Mon Dec 21, 2015 2:19 am

Re: Script to bring to front or send to back

Postby Xray » Fri May 04, 2018 6:56 am

There is a way to change zDepth of an object, but the method is very tricky and may not work for all scenes because the process requires using a sequence of "undo's" and "redo's". (I can see the puzzled look on your face! :crazy: ). In Algodoo, many features and attributes can easily be changed simply by changing the value of a variable or event. But some, like zDepth, were not designed to be easily changed, and so some of us dedicated Algodoo users had to figure out work-arounds for them.

Some time ago I created a scene which demonstrates how the zDepth of an object can be changed on-the-fly, and you can upload it here:

http://www.algodoo.com/algobox/details.php?id=149641
User avatar
Xray
 
Posts: 500
Joined: Sun Jun 17, 2012 6:12 am
Location: USA

Re: Script to bring to front or send to back

Postby keithg1229 » Fri May 04, 2018 11:48 am

Much appreciated, I will check it out. Thanks!
keithg1229
 
Posts: 3
Joined: Mon Dec 21, 2015 2:19 am


Return to Thyme scripting

Who is online

Users browsing this forum: No registered users and 5 guests

cron