Code to "wait" for something to happen after touching

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.
https://studio.code.org/docs/gamelab/createEdgeSprites/

I did see this solution pop up when typing this request.

Thanks in advance!

See if this helps
Basically, you use world frame rate

try this

1 Like

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)

Thanks so much, IMPixel!!