Page 1 of 1

Multiple Timed Spawns

Posted: Sun Nov 04, 2012 9:44 pm
by Tribar
I'm trying to figure out how to make trap in which 5 spawners shoot greater fireballs at you in intervals of one second, one after the other. In theory this would make
it so the player would have to keep moving along a path to avoid being hit by a fireball. And when the player steps on the next pressure plate on the path the order of of the spawners would reverse.

I'm not sure how well I explained this so if you need me to clarify anything let me know.

Here is a map of the room in question
Image

Re: Multiple Timed Spawns

Posted: Sun Nov 04, 2012 10:02 pm
by Ixnatifual
Make stepping on a plate activate the first spawner as well as a timer. The timer activates the second spawner, deactivates itself and activates a third timer in 1 second. The third timer activates the 3rd spawner, deactivates itself and activates a third timer. Etc.

Re: Multiple Timed Spawns

Posted: Sun Nov 04, 2012 10:14 pm
by Komag
this is probably a good candidate for a simple tick counter. have the script specify what you want to happen at each time (if tick == 1 then spawner1:activate() elseif tick == 2 then blahblah etc.) ending with tick = tick + 1, so you only need one timer instead of five with all those connections, having the timer continually tick the script.

Re: Multiple Timed Spawns

Posted: Sun Nov 04, 2012 11:20 pm
by Tribar
Thanks you guys I got it working.

By the way I like your tutorials Komag. They really helped me get off the ground with the editor