health meter?

Game Editor comments and discussion.

health meter?

Postby pigz96 » Fri Jan 27, 2006 11:52 am

i need some help to make text health meter
pigz96
 
Posts: 15
Joined: Mon Jan 16, 2006 5:36 pm
Score: 0 Give a positive score

Postby Troodon » Fri Jan 27, 2006 9:06 pm

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...
User avatar
Troodon
 
Posts: 1539
Joined: Thu Jan 12, 2006 3:29 pm
Location: HELL
Score: 56 Give a positive score

.

Postby pigz96 » Fri Jan 27, 2006 11:28 pm

thanks :D
pigz96
 
Posts: 15
Joined: Mon Jan 16, 2006 5:36 pm
Score: 0 Give a positive score

Making a health bar.

Postby Hblade » Fri Dec 08, 2006 11:50 pm

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.
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Postby Sgt. Sparky » Mon Dec 25, 2006 4:55 am

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
Image
Random Links:
viewtopic.php?p=19474#19474
Right now (10/14/2009) I'm working on some C++ projects, but I might be able to help if you have some Game Editor questions. :)
User avatar
Sgt. Sparky
 
Posts: 1850
Joined: Sat Oct 07, 2006 5:28 pm
Location: Somewhere out there, beneath the pale blue sky...
Score: 236 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest