magique
Full Member
 
Posts: 194
Posts: 194
|
Post by magique on Mar 15, 2016 14:12:54 GMT
If I uncheck Auto Start Waves, what method do I use to start the waves? I originally had this checked, but then my waves were starting before I wanted the game to actually start.
EDIT: I found the release notes file that says to call LevelSettings.UnpauseWave(), but it doesn't seem to work.
EDIT 2: I look at the LevelWaveSettings object in the inspector when the game is running and it shows that it's playing Level 1, Wave 0. I have no idea why it's showing Wave 0 and not Wave 1. So, I added code to GotoWave(1, 1) before unpausing, but I get the same results. Then I added GotoWave(1, 1) "after" unpausing, but it still shows playing Level 1, Wave 0.
EDIT 3: Ugh! Now I can't even get it to auto spawn anymore. It always says Level 1, Wave 0 no matter what I do. Any ideas what I did to mess this up?
|
|
|
Post by DarkTonic Dev on Mar 15, 2016 16:00:01 GMT
Sorry but I've never had "can't auto spawn" problem, and no one has reported it. I suspect that's your main problem and the others are side effects. Is there an error in the Console? If not, I suggest you delete LevelWaveSettings and start over. I think you must have done *something* to mess it up but I have no idea what unless you send me your project. Quite strange.
I just tried with a fresh copy of Core GameKit from the Asset Store and turning off Auto Start Waves works fine after calling Unpause Wave. I also never see it say "wave 0".
|
|
magique
Full Member
 
Posts: 194
Posts: 194
|
Post by magique on Mar 15, 2016 16:16:53 GMT
Sorry but I've never had "can't auto spawn" problem, and no one has reported it. I suspect that's your main problem and the others are side effects. Is there an error in the Console? If not, I suggest you delete LevelWaveSettings and start over. I think you must have done *something* to mess it up but I have no idea what unless you send me your project. Quite strange. I just tried with a fresh copy of Core GameKit from the Asset Store and turning off Auto Start Waves works fine after calling Unpause Wave. I also never see it say "wave 0". I guess I'll have to re-create it from scratch then. I don't know what I did. I did add in my Curvy integration, but that was working fine when I first added it. I was spawning and attaching the spline and everything was good. But then I added another Wave to the mix and sometime after that is when it stopped working.
|
|
|
Post by DarkTonic Dev on Mar 15, 2016 16:51:00 GMT
Yeah then it most likely happened because of some code mod you did.
|
|
magique
Full Member
 
Posts: 194
Posts: 194
|
Post by magique on Mar 15, 2016 16:54:52 GMT
Yeah then it most likely happened because of some code mod you did. Well, I'm not so sure since the code mod worked fine initially. And the code I did was additional functionality only. I didn't touch a line of original code. Although I won't rule anything out.
|
|
|
Post by DarkTonic Dev on Mar 15, 2016 17:59:21 GMT
If you figure it out let me know. As I said no one has ever reported this.
|
|
magique
Full Member
 
Posts: 194
Posts: 194
|
Post by magique on Mar 15, 2016 18:07:06 GMT
If you figure it out let me know. As I said no one has ever reported this. I can't look at this again until late tonight, but I'll let you know what I find out.
|
|
|
Post by DarkTonic Dev on Mar 15, 2016 18:52:30 GMT
All right.
|
|
magique
Full Member
 
Posts: 194
Posts: 194
|
Post by magique on Mar 16, 2016 15:10:45 GMT
I started over with a new LevelWaveSettings and I got it working without any code changes. So, it seems that something got mucked up in the data or settings somewhere that caused the issue. I have to say that the setup for this is very confusing. The various layers of data don't make complete sense to me. For example, I have to create a Pool in PoolBoss, but then I don't actually use the pool. I later have to create a Prefab Pool in order to actually use the pool. Why can't I just use the pool I already created? The extra layer causes confusion. The same thing with Waves. I'm not really getting this. I create a Wave in LevelWaveSettings, but it doesn't really contain the wave information. The Wave have Spawners and the Spawners have their own Wave settings. Maybe it'll make more sense as I dig deeper, but it's definitely confusing right now.
Also, although I got this to work, I did find an issue that I don't understand. If I create 2 Wave Settings on a single spawner then the objects never spawn. I wanted to have 3 enemies swoop in from the left and 3 enemies swoop in from the right using 2 wave settings on the same spawner, but they refuse to spawn in that case. However, if I create 2 spawners with their own wave settings then it works.
|
|
|
Post by DarkTonic Dev on Mar 16, 2016 16:39:24 GMT
I started over with a new LevelWaveSettings and I got it working without any code changes. So, it seems that something got mucked up in the data or settings somewhere that caused the issue. I have to say that the setup for this is very confusing. The various layers of data don't make complete sense to me. For example, I have to create a Pool in PoolBoss, but then I don't actually use the pool. I later have to create a Prefab Pool in order to actually use the pool. Why can't I just use the pool I already created? The extra layer causes confusion. The same thing with Waves. I'm not really getting this. I create a Wave in LevelWaveSettings, but it doesn't really contain the wave information. The Wave have Spawners and the Spawners have their own Wave settings. Maybe it'll make more sense as I dig deeper, but it's definitely confusing right now. Also, although I got this to work, I did find an issue that I don't understand. If I create 2 Wave Settings on a single spawner then the objects never spawn. I wanted to have 3 enemies swoop in from the left and 3 enemies swoop in from the right using 2 wave settings on the same spawner, but they refuse to spawn in that case. However, if I create 2 spawners with their own wave settings then it works. Let’s clear it up. Actually, you are using Pool Boss. Absolutely everything that spawns in Core GameKit uses Pool Boss, even if you’re using a Prefab Pool instead of “Specific” prefab in the Inspector. Once another person asked “why can’t you just combine the 2 (Prefab Pool and Pool Boss), but it wouldn’t allow the flexibility. They serve different purposes. Explanation below. Pool Boss is strictly for pooling (i.e. avoiding all Instantiate and Destroy calls). Here you specify the max number of each prefab that you will need (and create up front on Awake). Any time a prefab is spawned, whether it came as a random prefab from a Prefab Pool or “specific”, it uses Pool Boss. Prefab Pools are an *optional feature*, and are strictly for probability-based, non-prefab-specific spawning. So that prefab A can be spawned twice as often as Prefab B, etc. In use, only a random Transform is returned from the chosen Prefab Pool, and then that matching prefab’s item in Pool Boss is used when it spawns. We could not add this weighted random functionality into Pool Boss because it would not allow you to make 2 different Prefab Pools with the same prefab in different probabilities (Pool Boss does not allow a single prefab more than once). Prefab Pools are an optional feature, but Pool Boss is mandatory for Core GameKit usage. It is definitely unfortunate that we have 2 features with the word “pool” in them. Any suggestions if you understand how this works now? About the wave setting, actually we shouldn’t be allowing 2 settings of the same level/wave. A spawner cannot track that. I didn’t think to add a detection for that error state. The next version will have this and log an error to the Console if this happens.
|
|
magique
Full Member
 
Posts: 194
Posts: 194
|
Post by magique on Mar 16, 2016 16:43:51 GMT
Thanks for the explanation. So, it seems that I should skip prefab pools and just drag a specific prefab then. That clears that one up for me. I will use the prefab pool only if I want the specific functionality you have described. I don't have any naming suggestions at this time. I'm just barely getting to the point that it's functional and I can start converting my level over to use Core GameKit instead of my old system. Maybe once I've really dug deeper into it.
|
|
|
Post by DarkTonic Dev on Mar 16, 2016 16:50:58 GMT
Ok cool.
|
|
|
Post by DarkTonic Dev on Mar 16, 2016 20:08:00 GMT
Actually I just checked the duplicate wave thing (setting up a single spawner to have 2 waves of level 1 / wave 1), and it already logs an error to the console telling you why it fails. It says:
"Spawner 'EnemiesLeft' contains more than one wave setting for level: 1 and wave: 1. Spawner aborting until this is fixed."
So I believe you didn't look at the Console. Core GameKit in general tries to tell you why things don't work instead of just flat out failing. Please pay attention to the console next time something isn't working.
|
|
magique
Full Member
 
Posts: 194
Posts: 194
|
Post by magique on Mar 16, 2016 20:28:56 GMT
I didn't see any console messages, but maybe they were there. I usually only look at console messages if I have my own debug in there. I generally don't see console output from an asset unless it's error messages that don't allow the game to run. It's somewhat unusual to take a warning approach to something that is a game-breaker. I personally would prefer that it didn't even allow the creation of additional wave settings if they aren't going to work anyway. No worries though. I know not to do that again and I'll certainly look at the console window in the future if Core Gamekit doesn't seem to be working as I would expect.
|
|
|
Post by DarkTonic Dev on Mar 16, 2016 20:45:48 GMT
I didn't see any console messages, but maybe they were there. I usually only look at console messages if I have my own debug in there. I generally don't see console output from an asset unless it's error messages that don't allow the game to run. It's somewhat unusual to take a warning approach to something that is a game-breaker. I personally would prefer that it didn't even allow the creation of additional wave settings if they aren't going to work anyway. No worries though. I know not to do that again and I'll certainly look at the console window in the future if Core Gamekit doesn't seem to be working as I would expect. It's not a warning. It's an error (red). I agree it should not be a warning. The problem is that level 1 wave 1 is the default so if you add another wave you already have the error condition until you change it. I can add a big red box to the Inspector though if you think it's better.
|
|