How do you make a scene timer rule that is repeatedly checked?
Backtothis
Member, PRO Posts: 75
I wanted to spawn something every say, 1 second. The problem is, I can't use the game timer (because that messes up the spawn timings if the game is ever paused), and I can't just add an attribute to check if the scene is paused (because then the spawn timing is messed up if the game ever hangs for a moment while on that scene for whatever reason).
So I tried using the scene timer.
nextSpawnTime := 0
When scene.Time >= nextSpawnTime
-->Change Attribute: nextSpawnTime = nextSpawnTime+1
What happens is that it nextSpawnTime is incremented to 1, but thereafter is never incremented again, so I guess the rule is only being triggered once, since Display Text shows that scene.Time grows past 1 quite quickly. How do I fix this?
So I tried using the scene timer.
nextSpawnTime := 0
When scene.Time >= nextSpawnTime
-->Change Attribute: nextSpawnTime = nextSpawnTime+1
What happens is that it nextSpawnTime is incremented to 1, but thereafter is never incremented again, so I guess the rule is only being triggered once, since Display Text shows that scene.Time grows past 1 quite quickly. How do I fix this?
Comments