magique
Full Member
 
Posts: 194
Posts: 194
|
Post by magique on Jan 7, 2018 1:18:59 GMT
I'm just checking to see if this is a feature by design or a bug. When I set a Delay Wave value it delays the wave properly at the start of the level, but when the wave is complete and it proceeds to go into Repeat Wave, the Delay Wave value is applied to each repeating wave also. I am assuming this is by design, but for me it's not what I expected so it feels like a bug. But perhaps there is a better way to do what I'm trying to do.
Since there's no concept of overlapping waves, I want to kick off different waves later in the level using the delay wave value, but I also want some of these waves to repeat. But I don't want the delay wave value to apply to the repeated wave. After all, it already has a Repeat Pause time to take care of how long to pause before starting the repeated wave. Considering that feature, it seems like the inclusion of the delay wave on top of the repeat pause time is a potential bug.
Just to be more clear. I have a specific wave with a Delay Value of 20 seconds. So 20 seconds into the level it starts spawning this wave of enemies. This wave also has repeating on for a total of 3 repeats and I have Repeat Pause time set to 2 seconds. I expect that after the first spawns are gone that it will wait 2 seconds and spawn the repeated wave. Instead, it waits 22 seconds.
|
|
magique
Full Member
 
Posts: 194
Posts: 194
|
Post by magique on Jan 7, 2018 1:35:28 GMT
CheckForWaveRepeat();
if (_waveFinishedSpawning // wave is finished and in wait mode
|| ((Time.time - _waveStartTime < _currentWave.WaveDelaySec.Value) && _waveRepetitionNumber == 0) // shouldn't spawn yet because of Wave Delay setting.
|| (Time.time - _lastSpawnTime <= _singleSpawnTime && _singleSpawnTime > Time.deltaTime)) // not time to spawn the next item yet.
|
|
|
Post by DarkTonic Dev on Jan 7, 2018 3:53:24 GMT
Yes the delay wave is part of the wave setting and will happen on all repeats. This is by design. So don't use it for that purpose.
You can put a timed wave of 20 seconds and no spawners before this wave, that would work.
|
|
magique
Full Member
 
Posts: 194
Posts: 194
|
Post by magique on Jan 7, 2018 3:54:38 GMT
Yes the delay wave is part of the wave setting and will happen on all repeats. This is by design. OK. I've change it for my own purposes as it doesn't make sense in the context of what I'm doing.
|
|
|
Post by DarkTonic Dev on Jan 7, 2018 3:56:20 GMT
I edited my last comment, there's an idea there too...
|
|
magique
Full Member
 
Posts: 194
Posts: 194
|
Post by magique on Jan 7, 2018 4:08:06 GMT
You can put a timed wave of 20 seconds and no spawners before this wave, that would work. Maybe I'm completely missing how to do this and it could be really simple. It seems to me that there is no way to do overlapping spawns properly. For instance, I want Enemy 1 to start spawning and repeat say 5 times over 60 seconds. But I also want Enemy 2 to start spawning 10 seconds after Enemy 1 started spawning. So I don't want Enemy 1 to stop spawning, or have to wait until it's duration ends or all its enemies are destroyed, when Enemy 2 starts spawning. So Enemy 1 and enemy 2 waves are overlapping. One doesn't have to complete before the other starts. Your solution doesn't quite work because I might have 2 or more spawns going with wave delays for each one so that they can overlap. But if there is a mechanism for overlapping spawns, aside from triggered spawners, which I use for a different purpose, but doesn't really work in this case, then I'd love to hear how to do it.
|
|
|
Post by DarkTonic Dev on Jan 7, 2018 5:31:35 GMT
Correct, that's nit possible without doing some semi-complicated usage of World Variables and using them for the Delay Wave.
I.e. use a World Variable value set to 20 for the Delay Wave time, then in the Repeat bonus section add -15 to that World Variable so that the next time it would be a delay of 5. Possibly could work for you.
I'm going to add a checkbox in the next version to optionally not use Delay Wave i repeats though.
|
|
magique
Full Member
 
Posts: 194
Posts: 194
|
Post by magique on Jan 7, 2018 5:32:48 GMT
Yeah, I'd rather not make it that complex. The checkbox idea is a good solution for the future I think.
|
|
|
Post by DarkTonic Dev on Jan 7, 2018 6:12:46 GMT
Will do
|
|