I cant figure out how you make a good health bar

Talk about making games.

I cant figure out how you make a good health bar

Postby Kooldudese » Sat Jan 27, 2007 5:34 pm

How do you make a health bar that whenever touched goes down by alittle :?: plz post the codes if u can tell me how THX!! and also, i wanna make a BAR not just numbers.
User avatar
Kooldudese
 
Posts: 128
Joined: Sat Jan 27, 2007 5:20 pm
Location: In a house
Score: 0 Give a positive score

Postby Game A Gogo » Sat Jan 27, 2007 7:57 pm

create an animation whit a health bar, that goes from full to empty.
Create an actor whit that animation.
On create actor do this: Animation direction: Stopped
On the main actor, do the event that should generate your health decreasement and enter this code:
Code: Select all
healtbar.animpos+=1;
if(healtbar.animpos>healtbar.nframes)
{
         Destroy event actor thingy...
}


The "if(statement)" should destroy the actor if the health is at zero (Empty).
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Postby Kooldudese » Sat Jan 27, 2007 9:42 pm

THX
User avatar
Kooldudese
 
Posts: 128
Joined: Sat Jan 27, 2007 5:20 pm
Location: In a house
Score: 0 Give a positive score

Postby Game A Gogo » Sat Jan 27, 2007 10:26 pm

my pleasure, if you need some tune up/help/question about Health bar, ask me.
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Postby Kooldudese » Sun Jan 28, 2007 1:44 pm

umm, have a question, i wanna make a hp bar that goes up at the same time as the numbers... how do you do that, is it the same way as the hp bar?
User avatar
Kooldudese
 
Posts: 128
Joined: Sat Jan 27, 2007 5:20 pm
Location: In a house
Score: 0 Give a positive score

Postby Game A Gogo » Mon Jan 29, 2007 1:07 am

I don't get it
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score


Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest

cron