[solved]Spawn Wave Issue

So I’m up to video 100 and have had an issue somewhere between here and 95…

So I’ve followed the course verbatim (except im using the newest unity). The spawner works basically…i can get the ships to spawn, go on path etc BUT wave 1 wont spawn…everything after will spawn correctly but for some reason, it wont go…any ideas? I can still continue with the course like this it seems but I would be interested to know why it’s doing this and only on that Wave

Hi Blake,

Are there any error messages in your code?

The best would be not to continue until you fixed the problem. Otherwise, it might be that you implement more problems, and more problems result even more problems. At some point, it will be easier to redo the entire project than to look for bugs.

Yea nah otherwise everything works, no errors - the only thing is the very first wave refuses to spawn…I’ve mucked around with it, deleted the old ones I had created and made new ones and still run into this problem.

Have you already rewatched the video? Maybe a detail is missing in your project.

1 Like

@Blake_Fitzgerald you really should post some of your code especially the spawning code so that the people that help you have some short of reference.

You should think of this like a troubleshooting exercise. You need to isolate the variable and reduce the number of unknown factors. I would do the following.

  • Look at the the initial conditions and starting variables in loops. (since is only the first)
  • Remove the current first wave, and see if it always affect the 1st wave or if it is only affecting that first wave you have defined.
  • create a new enemy prefab and config object. (Maybe you setup something in a prefab incorrectly or your using an instanced prefab that has other values then you are expecting)
  • You need to eliminate possibilities until you are left with the offending lines.

Good Luck!

1 Like

yea i did all that already bro…thats what i dont understand…the rest work…the original 1st wave was the one i used to duplicate the others…after that i deleted them all and remade each individually but still get the same result…
ill post my code in a bit and see if any of you see if I’ve done something wrong…but I’m thinking it may be because I’m using the latest unity not 2018…so I might try and download that and recreate the project to see if that fixes it

yea been through it twice…
I started to have issues around when I was trying to connect the prefabs of the paths up with the waves…but saw a few ppl that were using the latest unity were having this issue…so Im thinking maybe the unity version is the issue…

HA! dude as I just typed that I did what you suggested…looked back at the enemy spawner and lo and behold the enemy spawner was set to start spawning at element 1! aha so no wonder it wouldnt spawn the first wave LOL

Thanks for you help ppls <3

1 Like

We have all been here! I can tell you that I have a permanent red hand print in my forehead from all the times I have said duh! and hit my forehead saying “I can’t believe I did that.” I once spent 2 days troubleshooting code to find out I was passing a 1 instead of a 0 as a parameter in a method.

I am glad you found it. Good luck on the rest of your game.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms