Update function



I would like to write a function that will change the position of a 3D object every few seconds (similar as update function in unity). In javascript this is possible with setTimeout(), but I can’t use this function in zapWorks Studio (it gives me an error: ‘Cannot find name: setTimeout’).
Any suggestions?



I think you want

Utility Functions

Z.every(…) Runs a function repeatedly after the specified time has passed.
Z.everyOff(…) Stops a function that had been previously scheduled with Z.every(…) from being called again.



Yes, I think this will do the trick. Thank you! :slight_smile: