Mega Mega Health && More!


Finally! 

Got a working health system. Now, with the help of a heavily worked FOR LOOP inside of the GUI Updater script, the health bar changes based on your transform states. As well as disabling health sprites beyond the max health cap. 

I have created GUI updaters before but this one required a little more tinkering because of the complexity of the system I was designing. I wanted the health bar to reflect the transform state colors and that meant the traditional method wouldn't work.  Instead, I had to put in conditions that basically mapped the sprites to the index of  i in the FOR LOOP. 

Basically, I wanted the base form to have yellow health at 1 HP and the Qwasome state beyond the 1HP to have blue health but still reflect that at 1HP you are your base state. 

And of course, I had to make sure that the health went away when you revert forms and expand when you transform. That required two separate FOR LOOPS, one for each state.  I will have to copy this system for each new state that I add to reflect the colors of that state. It's a small but powerful presentation aspect that I really love. To me, it's a lot of the small things in games that really make them feel and look great. 

!!!

I also got damage dealing and receiving working for both player and the PinePines. Complete with flickering and invulnerability states. 

Initially, I was going to code a base enemy script from the start but testing led to two scripts for the current enemies. And after working on damage, health, and flicker invulnerability code for player and enemy, I am done writing the same code over and over and over again haha. 

So next I am going to code the base enemy script and reduce the amount of repeat code I have to write. I will add in bools for options for every enemy type and possibly Bosses as well but we shall see about it as the game progresses. Bosses might be too unique for a simple base script.

Though this time around with the flickering script I got smarter! I came up with the idea of using a FOR LOOP with an int variable: flickerLoops that basically runs in a CoRoutine and changes the Sprite Color from White to Clear back based on the number in the flickerLoop var. 

It's powerful and flexible! And I love watching it work! 


Next up is the base enemy script. Then after that, I hope to get a working demo of a level laid out to see how the current systems work together. Once a level is built, progress will stat steam rolling as I will have a base to work from. 

Stay Tuned Super Birds for the next update! 


 

Leave a comment

Log in with itch.io to leave a comment.