Object mirrored with a script
5 posts • Page 1 of 1
Object mirrored with a script
Hello! I'm wondering if there's any possibilty of getting object/group of glued objects mirrored onCollide with other object or onHitByLaser? I need it to resolve a little problem with my city project scene. I need your advice guys if there's a smart script or just a command or no resolve 
-

p03tr0 - Posts: 3
- Joined: Sat Dec 24, 2011 12:40 am
Re: Object mirrored with a script
It's possible but very complicated, you actually need to delete old and re-create new one.
Dream of Algodoo as game development engine...
-

Kilinich - [Best bug reporter 2010]
- Posts: 2098
- Joined: Mon Aug 31, 2009 8:27 pm
- Location: South Russia
Re: Object mirrored with a script
So there's my another idea to glue mirrored and fully transparent layer of objects to another one. OnCollide or onHitByLaser invisible layer would come fully visible and one that was fully visible would go invisible. And that's my another question. How to make group of objects transparent when they haven't the same color (in script menu "color = ?") 
-

p03tr0 - Posts: 3
- Joined: Sat Dec 24, 2011 12:40 am
Re: Object mirrored with a script
you could use an IF code in the color of ALL the objects you want to change
e.g. This small code changes the color of an object based on whether the sim is running or not.
you could edit that code to run on your own scene.my.* variable.
<variable AND condition> ? [TRUE] : [FALSE]
remember to put the code within { } otherwise Algodoo will not know that it needs to keep reading the code.
e.g. This small code changes the color of an object based on whether the sim is running or not.
- Code: Select all
{sim.running = true ? [1, 0, 0, 1] : [1, 1, 1, 1]}
you could edit that code to run on your own scene.my.* variable.
<variable AND condition> ? [TRUE] : [FALSE]
remember to put the code within { } otherwise Algodoo will not know that it needs to keep reading the code.
When asking for help, READ THE STICKIES!
- electronicboy
- Posts: 1694
- Joined: Mon Aug 31, 2009 6:18 pm
Re: Object mirrored with a script
The main idea is to change transparency of many objects with many colors and one variable. E.g circle is white, box is green and another box is blue. It's only to change transparency of each object leaving their color the same.
It's like ( color = [?, ?, ?, {scene.my.var}] ). I know it's wrong syntax, just an example.
It's like ( color = [?, ?, ?, {scene.my.var}] ). I know it's wrong syntax, just an example.
-

p03tr0 - Posts: 3
- Joined: Sat Dec 24, 2011 12:40 am
5 posts • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 7 guests



