Hello,
I've got this game where traffic cars are supposed to spawn on the road every x seconds set by a timer.
I'm using the timer behavior as such:
What happens is, it will spawn a traffic car every 0 seconds since Global Variable 'TimerObjectAmount' starts as 0. Global Variable 'Level' starts as 1.
However, if I restart the level by clicking the button (for example you ran out of time in the game), the traffic spawns just fine.
It just won't set the TimerObject to the according TimerObjectAmount until the layout was restarted by the button.
I tried many things, changing the order of events, destroy and recreate the TimerObject, nothing seems to work.
If you proceed to the next level without the current level being restarted, it will change the TimerObject correctly, but it won't have the correct number gotten from TimerObjectAmount. In other words, it's always one step/level 'behind' unless that specific level was restarted.
Example: You're one level 1. TimerObject is using the initial TimerObjectAmount=0 and ignores my event which should set it to 3. Layout is restarted ingame. TimerObject was correctly set to 3.
Hope someone knows what's going on?
Thanks!