Hey there guys. You have been a great help to us thus far, and I want to thank you all for your support.
I was wondering if I could get a little more assistance... my team is developing a top-down arcade shooter, and we've finally gotten to the best part: designing enemy and bullet choreography. The problem is that I would like to delay the spawning of the bullets; as it were, as soon as enemies are created, their spawners fire. Is there any way to delay the firing of the first wave of bullets?
Comments
No worries, we're here to help as much as we can.
So have you tried to setup the Spawner.WaveDelay/Spawner.WaveSize config values?
That should help you define for how long you want to delay the spawning at first and then you can change it by calling orxSpawner_SetWaveDelay() later on (after a timer or when receiving one of the spawner event that tells you a wave has been spawned).
I was looking to see if there was some kind of an "offset" value for firing the first wave, but there doesn't seem to be one. However, I think that (while typing this post) I may have found a solution! I could store an offset timer of my own somewhere in the config, use it to set the timers as necessary, and when the timers are up, change the wave size from 0 to some other number.
If I change the wave size on a spawner from 0 to another number, do I have to call enable afterwards, or will it automatically start spawning the next frame?
And yes, it'll spawn next time, no need to enable it, it's already enabled, even with a WaveSize of 0.