Coding Field
-
Can there be another field that won't have to function on a certain event? i ran into this when i was building an arm, which had a receiver that calculated and processed everything, but the ontouch and ontick fields require an event to trigger them. Can there be a simple field for code like: if getVar('sens')==1 then setVar('claw',0.6);end
if a==1 then setVar('claw',0);end? -
...ontick does it fine, but there can't be 2 ends, one should be elsif.
-
Actually there can be as many ends as you want. But in this case, there could be a conflict, so you may as well use elsif. Also, onTick works fine and doesn't need an event to trigger it; it's a 'frame' event, occuring every frame or every rate frame. Next version there should be global script, which'd be perfect for this.
-
if getVar('sens')==1 then setVar('claw',0.6);elseif joybutton("a")==1 then setVar("claw",0);end; -
I think thats it...
-
You don't need the first 'then'... but yeah
-
the second time you use setVar("claw"), should be getSetVar.
-
If it's going in onTick, what's the point?
-
yeah, you're right

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