Hello,
I'm trying to figure out how to code a health system just as in the zelda games where you have a heart comprised of four smaller bits. Ugh, how do I say this? Each heart can take four damage before a complete heart is lost - you know what I mean.
so, what I did so far was declare an array eg. Hearts[10] and an integer: int Heart=9; and had a function with something like this within it:
if(Hearts[Heart]==2 && Heart!=0)Heart--;
if(Hearts[Heart]<2)Hearts[Heart]++;
Actually, each heart in my game can take 2 damage.
Does anyone have any suggestions on how I can make this better? Like, how take away so many hearts at a time?
I'm not sure if I saw any tutorial on how to do this...