I have a nice long weekend ahead of me, so it’s a great time to prematurely mess up my sleep schedule! Starting this little mini-vacation off on the right foot. Anyways, I worked on the game a bit tonight. Made some huge errors in logic and then tried to fix them only to now have something I’ll have to come back to later! The first thing I did tonight was make all the enemies do a 1 out of 45 check to see if they want to fire a projectile at me (Just to get enemies firing at me, it’s not permanent especially since it is extremely bad). So now they fire big red balls (red is the color of EVIL) at the player at random intervals. Sometimes they fire a lot and some times they don’t, it’s the wonders of chance at the low-low price of not having to code in more complicated timers or checks. So now that the enemies are slightly more formidable I added an extra life power-up that was ~supposed~ to spawn one in as soon as the player gets down to one life. The problem I made for myself is that the power-up DOES spawn… it also didn’t STOP spawning until it collided with the player (as shown below).
While this is hilarious and I was literally stifling laughter, this isn’t some bonus level, this is just supposed to be normal game-play!
So I fixed it up a bit and now not-as-many spawn but still more-than-one spawns; which is troubling.
This is where the logic comes in that I’ll have to figure out next time. I’ll probably have to change the event to trigger at the start or end of a step/frame rather than just on the “step/frame” event itself. For tonight you get two lives, but I won’t be so nice once I figure out how to drop it down to ONE.