How do I make an object to appear for x seconds after a button press and when the x seconds ends the object disappears ?
Develop games in your browser. Powerful, performant & highly capable.
Create a global variable called Timer and Every 1 second -> add 1 to Timer
Example (If you only need to set visible/invisible)
While Timer is >=0 AND While Timer is <= X ---> Set visible
Else ---> Set invisible
As an alternative you could add the Timer behaviour to the object. Make the object visible, start the timer, and on timer complete, make the object invisible.
use timer like so
not sure what you want to use this for, but it appears to me that using the following actions would be easiest:
Spawn object (or set visible)
wait x seconds
Destroy object (or set invisible)
Mathijs90 true all you do is use timer the way I used it in demo