Request: Spawn delay

mtrain

New member
I think it is time to make a new useful request to add a new feature to OpenBOR. It is a spawn timing parameter.
Last time i have face this issue many times, and for me this will be very useful. I am saying about next:

spawn enemy
coords 500 500
delay #
at 1000

adding delay parameter to the entity spawn will allow entity to be spawned after # seconds. It can be used to spawn many entities at one scrollposition one by one, like enemies jumping from the wall, or make decorations organized easier. It will allow use same entities to be spawned at different time without editing their spawn animations or make several spawn animations. I think it is can be achieved with a script but a simple command will make it more convenient.
 
For now you have to use other entity to spawn all enemies every 5 seconds and set delay properly so it spawns enemies for you on frame 1 ,2,3 etc. if frame 1 spawn enemy, if frame 2 spawn enemy etc. this way you can control it, and you can give it alias, so it will spawn different enemies based on alias.
 
I have already make something similar but now I need just that script so I can define each enemy to spawn with delay. For example a group of 4 enemies jumps from the wall one by one, instead of making 4 separated spawn anims.
 
Yep you need to acquire that when entity is spawned then store it in a variable
Then in a looping animation compare that stored value with currently acquired elapsed time. The former is obviously lesser than the latter so add a delay value to compensate

Elapsed time >= Stored + Delay

That's the basic idea
 
Back
Top Bottom