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
Advertisement