|
Post by DarkTonic Dev on Jan 2, 2017 19:18:12 GMT
Oh right, that's because they're spawning as a child of Pool Boss. Which can be changed, but by code only. I'll add an option to the roadmap for this.
1. Yes 2. Yes.
Although there is a "Wave Pause Behavior" in both spawner types to get around this if you want to.
|
|
Oshigawa
Full Member
 
Posts: 228
Posts: 228
|
Post by Oshigawa on Jan 2, 2017 20:15:50 GMT
Cool, thanks. Oh, no need for getting around it, i run all of the waves as one object which spawns multiple enemies from the pool as soon as is appears, so the pause won't be interrupting anything. After all, i'm back to syncro spawners, which is good, i think it's simpler than triggering waves and moving the level wave settings object around So, after a set amount of time, pause kicks in, existing enemies are added to the array, as soon as the array is detected as empty (when enemies are destroyed or go off-screen), custom event is fired which starts the elimination type boss wave and unpauses the waves. That about does it nicely.
|
|
|
Post by DarkTonic Dev on Jan 2, 2017 20:58:08 GMT
Glad its working for you!
|
|
Oshigawa
Full Member
 
Posts: 228
Posts: 228
|
Post by Oshigawa on May 8, 2017 11:44:13 GMT
Hi again! I failed to see few steps forward and i ended up in trouble. As mentioned earlier in the thread, i made 20 syncro spawners (5 on each screen side) with each wave activating a random syncro spawner subset. To make waves spawn using different syncro spawners (for sake of variety), each wave on every syncro spawner is the same. That way, each wave will spawn enemies on a different position and it will be nice and dandy. That all sounds good, but in practice, when difficulty increases and multiple spawner subsets activate at the same time it's no good, since the same wave will spawn same prefabs, only on different positions, which is not the idea i had in mind. Workaround would be overly complicated i think, and it would result in a much larger number of waves involved.
Since there's (i suppose) no way of launching different waves at the same time using syncro spawners, i'm afraid i will have to get back to using triggered spawners. We already discussed it, i can simply use global waves with empty waves that will trigger custom events which, in return, activate triggered spawners.
But there's something i miss and i don't see there's a way to emulate it. By using syncro waves that are not empty i can use "end when all destroyed", which is kind of essential for self regulating the difficulty (making waves spawning faster if you're a good shot). By using triggered spawners there's no way i can implement that. Any suggestions?
One more thing, is there a way to change the number of valied custom event receivers on runtime? I tried getting the spawner properties, but there's no valid receiver quantity to be found.
|
|
|
Post by DarkTonic Dev on May 8, 2017 16:25:32 GMT
Spawning the same prefab from each spawner could possibly be fixed by using a bunch of Prefab Pools for with "optional" prefabs in them (made active by World Variables in certain ranges). That may get you where you want, or not.
What you might investigate doing it creating a certain "boss" prefab in each spawner wave that will go to the next wave when it's destroyed. That would require you creating a Killable Listener with one line of code in it.
I'm not sure what you're asking in that last question. Custom Event Receivers are stored in the LevelSettings game object, not any spawner.
|
|
Oshigawa
Full Member
 
Posts: 228
Posts: 228
|
Post by Oshigawa on May 9, 2017 7:17:47 GMT
Hello, sorry, i was unable to answer yesterday. Yes, sorry, a mistype, i meant levelsettings, not spawner, i don't remember seeing valid qty exposed as a variable. I didn't enter the script (i'm at work), is it exposed as a public variable? Is there a possibility to put a random min/max range for valid qty of triggered spawners in the roadmap?
I'll wrap my head around it, i see there is an active mode setting for the pool items, that's handy, but i'm yet too see how to avoid overlapping same prefabs on different spawners. Maybe by adding the prefabs to an array then eliminating the duplicate ones or something like that but all of that seems overly complicated for the purpose. I have an idea. When i use the prefab pools, is there a way to eliminate the item from the pool once it is spawned and then "refresh" it once the new level starts? Does the weight actually represents how many prefabs of certain types are in the pool when i select exhaust before repeat?
I've got a better idea on this one! I can use the existing array used for boss wave spawning i mentioned earlier, as soon as it is empty i can launch a new wave, and when the experience variable hits a threshold, it launches a boss event instead of a new wave. Hope that checking an array every frame won't hit cpu too heavy. Since i'll be using empty global waves, i won't be using wave completion bonuses to add points to experience variable, but killable modifier instead. That's even better, i can fine-tune the difficulty.
In the end i guess it will function something like this. Empty waves trigger triggered spawners. Destroyed enemies add up experience and empty the array. When experience reaches threshold, waves are paused and boss wave event is triggered. When array is empty, end wave event is sent so the next starts (unless experience threshold points to starting a boss wave). For that i will also need an answer for that first question, runtime tweaking of valid triggered spawner receivers.
|
|
|
Post by DarkTonic Dev on May 9, 2017 16:06:07 GMT
Your first question: Custom Events already you can do Closest X or Random X receivers. Isn't that what you want? Are you wanting to change that at runtime for some reason? 2nd question, could be pretty complicated or non-doable. Have 2 Prefab Pools with opposite criteria for the same pool items. That way prefab A would spawn from spawner A and prefab B would spawn from spawner B if the World Variable was a certain value, or the other way around if not. Your last idea sounds pretty good 
|
|
Oshigawa
Full Member
 
Posts: 228
Posts: 228
|
Post by Oshigawa on May 9, 2017 16:45:49 GMT
Hello,
yeah, maybe i'd like to ramp up the difficulty during the level itself by increasing the number of valid receivers on custom events or experience variable, not wanting to wait for the next level. Or launch a special type of random event, for example a meteor rain that will be difficult by itself and i want to keep the enemy spawning at minimum at that time by lowering the valid receivers quantity. I suppose that can help me provide some more variety to the game.
For the second question, that sounds like a good idea but it might prove non-doable in the long run, too much complication leads to branching into further complications. Would the prefab pool with all of the items of weight 1 and exhaust before repeat checked prevent spawning the same prefabs if all of the triggered spawners for the wave are set to spawn them from the same prefab pool?
Or, let me rephrase it to a real situation. There's a prefab pool with two objects, each with a weight of 1. There are two triggered spawners spawning from that prefab pool only. Exhaust before repeat is checked. Custom event hit both spawners at the same time. What is going to happen?
1. Both spawners spawn the same prefab? 2. One spawner spawns one prefab, other one another? 3. One spawner spawns one prefab, other one spawns nothing?
|
|
|
Post by DarkTonic Dev on May 9, 2017 18:01:29 GMT
Same prefab pool, will refill as soon as all active items are used. It will not prevent a weight:1 prefab from spawning again after pool is refilled. Only Pool Boss controls the max of any prefab that can be spawned.
You can change the number of active receivers by disabling the game objects. You can also use a different Custom Event that has less listeners. There may be a way to change the number at runtime, I'm not sure. I can take a look at the code if you still want it.
|
|
Oshigawa
Full Member
 
Posts: 228
Posts: 228
|
Post by Oshigawa on May 9, 2017 18:48:08 GMT
Ok, good enough, than i know how to handle it.
Nah, don't want to bother you, if it can't be accessed easily then it wasn't meant to. Disabling objects sounds like a good idea though, i'll just disable a random number of them and voila. Thanks for the idea and support once again!
|
|
|
Post by DarkTonic Dev on May 9, 2017 20:34:07 GMT
Ok cool. I could change the max receivers to a KillerInt, meaning it could use a World Variable value as an option. Useful?
|
|
Oshigawa
Full Member
 
Posts: 228
Posts: 228
|
Post by Oshigawa on May 9, 2017 21:04:13 GMT
Why not!
|
|
|
Post by DarkTonic Dev on May 9, 2017 21:07:53 GMT
Added to roadmap.
|
|
Oshigawa
Full Member
 
Posts: 228
Posts: 228
|
Post by Oshigawa on May 14, 2017 13:59:50 GMT
Well, in the end i decided to go full on with triggered spawners and prefab pools (just as you recommended when i started the thread), no global waves, no syncro spawners, and it's working great even with only with a basic FSM without some in-depth tweaking, based on number of enemies on screen and experience points.  Now i anxiously wait for that valid receiver qty variable 
|
|
|
Post by DarkTonic Dev on May 14, 2017 17:51:46 GMT
I already did the Receiver Qty variable yesterday, but not doing a release for a bit. You can email us at support@darktonic.com with your Asset Store invoice PDF and we'll get you the update.
|
|