SOLVED - Was working just fine for a day, didn't change anything but....

dreph

  • Posts: 140
Howdy! So I'm having a strange issue, and it's likely that it should not have been working to begin with, but here it goes.

I am working on a Spawn Enemies script.  The concept is that once the player(s) get to a certain point on the screen, the enemies spawn AND then it sets the next checkpoint for enemy spawns. As of yesterday, this was working perfectly.  It would increment the CP attribute by one, and get the appropriate coordinates for the next checkpoint.  I was playing around with making it a bit more complicated, but then it started incrementing all the way to the last checkpoint immediately after the enemies spawn at the first checkpoint.  What did I do wrong?  Any input is welcome.

I'll check back in if I figure it out before anyone is able to give input.  Sorry for delays in replies I'm also taking care of a newborn.

« Last Edit: November 09, 2018, 11:28:04 am by dreph »

dreph

  • Posts: 140
Actually, just like I mentioned I don't think it should have been working to begin with.  I believe it was the order that the scripts were running, but the fix was to add a delay to changing "Spawning" to false after EnemyCount > 0

Hope this example helps anyone running into issues like this.