script help
4 posts • Page 1 of 1
script help
is it possible that if the simulation is stopped that this color has the object [1.0, 1.0, 1.0, 1.0] then for example and when the simulation will run the object that has this color [0.0, 0.0, 0.0, 1.0].
-
FLO - Posts: 16
- Joined: Thu Aug 18, 2016 5:11 pm
- Location: germany
Re: script help
1) color == [1,1,1,1] ? {sim.running = false} : {}
2) color == [0,0,0,1] ? {sim.running = true} : {}
2) color == [0,0,0,1] ? {sim.running = true} : {}
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: script help
Many thanks to the always helping me, I find it greatly appreciate it.
I think I put it a little wrong, this should happen actually exactly the other way around.
I think I put it a little wrong, this should happen actually exactly the other way around.
-
FLO - Posts: 16
- Joined: Thu Aug 18, 2016 5:11 pm
- Location: germany
Re: script help
The following line of code must be placed in update (it will not work in postStep).
sim.running ? {color = [0,0,0,1]}:{color = [1,1,1,1]}
What this does:
When the simulation is running, the color will be black.
When the simulation is not running, the color will be white.
Is that what you want?
sim.running ? {color = [0,0,0,1]}:{color = [1,1,1,1]}
What this does:
When the simulation is running, the color will be black.
When the simulation is not running, the color will be white.
Is that what you want?
-
Xray - Posts: 500
- Joined: Sun Jun 17, 2012 6:12 am
- Location: USA
4 posts • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 14 guests