How to dismiss a rule after a certain amount of time?
hello all, i was wondering how i would go about dismissing a rule for an actor after a period of time. i am trying to make my spawner spawn x amount of actors after 0s and then spawning x amount of actors after 30s but i don't want the first rule to come into play after 30s.
anyone know how to dismiss or delete a rule after a certain period of time?
anyone know how to dismiss or delete a rule after a certain period of time?
Best Answer
-
gyroscope I am here.Posts: 6,598
Hi, @mscesario
There's a couple of ways, one being to use the built-in scene time attribute.
Make an integer attribute called SpawnNum, set to amount of spawns you want the first time around. So because you want your stuff to happen straight away, your Rules would be something like:
When SpawnNum > 0
Timer: Every 0 seconds ----( this is if you want the spawns to all happen at once)
Change Attribute SpawnNum to SpawnNum-1
Spawn Actor
When scene.Time = 30
Change Attribute SpawnNum to ---- the amount of spawns you now want
Timer: Every 0 seconds ----( this is if you want the spawns to all happen at once)
Change Attribute SpawnNum to SpawnNum-1
Spawn Actor
If you don't want the spawns to happen all at once, simply adjust the Timer to Every 0.2 or something. Hope that helps you out.