GAME MAKER HEALTH

Posts

Pages: 1
on game maker i need help creating the health for a game i am making. also i need to work ou hw to kill an enemy in more then one shot.

please help me!
Not so sure about the kill the enemy in more than one shot but with the health i think ou have to type in the amount of health you want given to the enemy and activate that event. I am pretty sure that is what my friend did.
I took a class on using Game Maker, so I think I know how to do this.
If you want to program health for 1 enemy only, go to A1. For multiple enemies, go to B1.

A01: Let's say that you want to kill an enemy with 10 health, and each shot does 5 damage.
A02: Create the enemy object and sprite.
A03: Go to Add Event --> Create (Has a little light bulb next to it).
A04: Under the Create event, go to Tab Score --> Set Health.
A05: Set health to 10. *Do not check Relative box.
A06: Go to Add Event --> Collision --> .
A07: Under >< go to Tab Score --> Set Health.
A08: Set health to -5 *Check the relative box.
A09: Under the same event and tab, select Test Health.
A10: Set Value to 0, equal to.
A11: Go to Tab Main1 --> Destroy the Instance. Set to "Self."
A12: Try the game. The enemy should die after 2 shots. (10 - 5 = 5, then 5 - 5 = 0, if health is equal to 0, object is destroyed)

That's should do it. Also, make sure that the is programmed to destroy on contact with the enemy object. If you have any problems, reply back to me.
Ok, I gotta go take my shower now, I'll get back to you on multiple enemies. For now try programming some bosses or something.
Note that this is for GM7. The words for some things are different in other GM versions, but they have the same icon and effect.
Thanx for that please write in the other stuff when ever you get the chance

no rush!
Pages: 1