Page 1 of 1

health meter?

PostPosted: Fri Jan 27, 2006 11:52 am
by pigz96
i need some help to make text health meter

PostPosted: Fri Jan 27, 2006 9:06 pm
by Troodon
Make a variable that changes when the main actor collides with enemies. Put in create actor of meter the starting status of health. When actor collides with enemy
thenameofyourvariable = thenameofyourvariable - 10;

If the health is in beginning 100, it will go to 90 after collision.
I hope this helped...

.

PostPosted: Fri Jan 27, 2006 11:28 pm
by pigz96
thanks :D

Making a health bar.

PostPosted: Fri Dec 08, 2006 11:50 pm
by Hblade
Right when you make an HP bar image, such as a simple image that has a certian width or height, you can edit the Collission effect to where when it hit's the player, then the bar's width or height is reduced to a certian ammount. In other words, you can make this like this. Collission, Gun Bullet, Any side of player, Script editor. In the script editor, put width = width - 1;
Immidiat Action, then test it out, Immidiat action is shown when you click on the Add Event, just incase you forget. Oh! and one more thing, edit the HP Bar Image in draw actor, then put this script in it. if (HP Bar >=0)
{
DestroyActor("Player");
}
Ok, your good to go.

PostPosted: Mon Dec 25, 2006 4:55 am
by Sgt. Sparky
easier health bar: actual bar in vision that when the main actor hits the actor that "hurts" him makes the bar move further out of vision, when the bar is out of vision it will destroy the main actor. or whatever funtion you want it to do. Or you could just have a health actor that is a text of 000 and on the create actor event:
Code: Select all
textNumber = 100;

and on the draw actor event of the health bar:
Code: Select all
if (textNumber < 1)DestroyActor("MainActor");

hope that helps if you are still havin' probs. :D