On Tick?
-
hi
what are ontick and similar commands? where can i find them and how are they used?edit:
OK, i found out that i missed the latest version -.-
but still: how are they used? what can you do with them? how do i turn a var back when the body isnt touched anymore? -
ontick executes your command every frame of the simulation. if you put in playsound('shot.wav'), it would play the sound every frame. and setting variables to something else when an entity is not touched is not really possible with just script, unless you want a highly unstable method of setting it back. if you really want to use this code, put this in ontouch: setVar('name',1) and in ontick: setVar('name',0). hope this helps!
-
... But make sure to set the onTick framerate to 2

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