Toggling Thrusters?
-
Hi. The whole SP3 thing is a huge improvement over the previous one and there doesn't seem to be a "SP For Dummies: Toddler Edition" anywhere that explains the scripts in plain english.
So I was wondering if there's a way of turning on/off a thruster with a keystroke? I understand that it's possible (with Wacov's code) for emitters, but not the same case for thrusters. Tried my best with the guessing, but no success. Help?
-
Yes there is a toggle script. http://sketchyphysics.wikia.com/wiki/Advanced by Wacov.
-
That does work, but I don't know how to set the speed/force. Help?
-
For thrusters... I am not sure.
Try using this in 'onTick'
push(1)
Note: You can change the 1 for the value you want.
-
(if frame==1;setVar("repeat",0);setVar("toggle",0);end;if key("space")==0;setVar("repeat",1);getVar("toggle");elsif getVar("repeat")==0;getVar("toggle");elsif getVar("toggle")==0;setVar("repeat",0);getSetVar("toggle",1);else;setVar("repeat",0);getSetVar("toggle",0);end;)*1
The '1' at the end is thruster power
Space is the keystrokeNow i can haz catnipburger?
-
So you want to toggle a thruster? If you are using Wac's script, remember that the output is getVar('toggle'). I would suggest putting this in the thruster script field: getVar('toggle')*value.
-
Thank you all for your input.
@unknownuser said:
*value
@unknownuser said:
*1
Damn, it's that pesky little star that I kept forgetting about...
@unknownuser said:
Now i can haz catnipburger?
Why, yes.
Help yourselves.
-
Mmmmmmm... Catnip
Advertisement