I have a game where every x seconds a random enemy spawns.
every 5 seconds - set local variable x to choose(1,2);
if(x == 1) spawn unitA
else spawn unitB
If you die u have the option to restart by clicking on a button. The button basically does nothing more than "Restart Layout". Let's say I died within the first 3 seconds, and then press restart, the monster will spawn within the next 2 seconds instead of 5 again.
I have no idea why but I guess its bc it somehow doesnt reset the timer?