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..
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register LoginAdvertisement