A student is wondering is there is a “wait” code? He wants his player to wait for a certain amount of time when touching another object and then for the player’s velocity to increase. We looked through the game lab docs but couldn’t find something that would do that.
I did see this solution pop up when typing this request.
You can use the setTimeout() function in Javascript. It does something once the amount of milliseconds you indicated in it passes. Use: setTimeout(toDoFunction, timeInMilliseconds)