I have a character running in the game and i want to trigger some sounds while he is running at random times, taking into account this is an endless running game.
Can someone help?
Thank you.
Develop games in your browser. Powerful, performant & highly capable.
Use the timer behavior.
On start layout, set timer to random(a,b) where a is the minimum time and b is the maximum time between sounds.
On timer complete, play sound, and set timer to random(a,b) again.
I use choose() for that :
System > Every X seconds, and for interval I use : choose(0,2,3,5,7) (in seconds), but can be more or less…