Normal, you set Respawn to 0 every tick o.o
But event sheets run from top to bottom, so it should only be 0 at the very end of the tick.
This is the pseudo-code of what I had in mind:
foreach monster:
Subtract dt from monster.Health
foreach monster:
if monster.alive & monster.Health<=0 :
destroy monster
increase RespawnCounter by 1
Repeat RespawnCounter times:
System create new monster
System Set RespawnCounter=0
So first we decrease the lifetime counter for all monsters. Then pick the ones that have lost all their health (and have their "Alive" flag set) and kill those. For everyone that got killed increment global variable so we can respawn them later. Next run a loop and create a bunch of new monsters. Once we are done with that reset respawncounter to 0 so no more new monster appear.
I am completely aware of the fact that you can get the same behavior with a dozen different conditions/actions. My question is: why is the example I posted in the OP not behaving as outlined in the pseudo code above? The monsters all disappear but only 1 new monster gets spawned. It's as if the Repeat loop only runs once.