by Foxi4 » February 26th, 2012, 12:36 am
"Health" is a very abstract unit. The best you can do is to prepare a global/non-global variable for the character and whenever "something" happens, decrease the value of this variable.
I know it sounds like black magic if you're new to programming, but just as an example, declare a global called "Health", give it a value, say, 100, and decrease from it whenever something (If statements) happens, ex. when you get hit by something (If collision with).
In step, when "Health is equal or less than 0" set a death scene - that's really the easiest way to manage this.
Current Projects:
FalloutDS: Postponed until proper libraries are created, 10%
Foxi_Lib: A completely revised version of NitroSprites[FINAL], NitroBackgrounds and NitroText[FINAL], 40%