OnTouch, OffTouch
-
How do you script something so that when its touching, var=1, and when it stops touching, var=0?
I've done it before, but when I tried it again, it didn't work. Even reverse engineering the one that did work, didn't work. I'm very confused at this point and scripting has stumped me again.
This is what worked:
in OnTouch; setVar("left_easy",1) in OnTick; setVar("left_easy",0)
and what didn't work:
in OnTouch; setVar("thrust",1) in OnTick; setVar("thrust",0)
-
Try putting a getSetVar('thrust',0) where you would put a getVar('thrust').
-
in the "scripted" section of the UI
, type:
ontouch{ setVar("blahblahblah",1) } onuntouch{ setVar("blahblahblah",0) #this is the "offtouch" bit }
try that..
Advertisement