I have a spawn system function that looks like this
When i pause the game, using this code
The enemy AI keeps on spawning
How can i pause the spawn system function when paused?
Develop games in your browser. Powerful, performant & highly capable.
I would honestly just break the loop and reinstate it on button presses.
The function is 'pauzed'.
The postponed actions are not.
Use System > timescale.
(Change the rate time passes at in the game. Useful for slow-motion or pausing effects.)