Hp bars, not normal ones...theres something hard to do

Talk about making games.

Hp bars, not normal ones...theres something hard to do

Postby Kooldudese » Tue Mar 27, 2007 10:18 pm

umm, how do you make Hp bars that follows numbers,
for example, when you hav a hp bar of 100 hp, there is a bar, and also a number either beside or on it, and when the hp goes down/up the number goes with it.
how do you do this?
8)
help! :!:
User avatar
Kooldudese
 
Posts: 128
Joined: Sat Jan 27, 2007 5:20 pm
Location: In a house
Score: 0 Give a positive score

Postby Kooldudese » Tue Mar 27, 2007 10:19 pm

a code, file, or explanation will do 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 Fuzzy » Wed Mar 28, 2007 3:01 am

Use a standard HP bar. Overtop of it, put a text actor. Make the text actor have the HP bar as its parent. In the draw event of the text actor, make text actors textNumber variable equal to the HP variable.
Mortal Enemy of IF....THEN(and Inspector Gadget)

Still ThreeFingerPete to tekdino
User avatar
Fuzzy
 
Posts: 1068
Joined: Thu Mar 03, 2005 9:32 am
Location: Plymostic Programmer
Score: 95 Give a positive score

Postby Kooldudese » Thu Mar 29, 2007 10:36 pm

yes, that is a way, but, making 100 slides isent that good, and plus im trying to make a game that when you lvl up you can make your hp up too, and when you get to lvls like 100 and get 1000+hp then i dont want to think about making 1000+ frames.
User avatar
Kooldudese
 
Posts: 128
Joined: Sat Jan 27, 2007 5:20 pm
Location: In a house
Score: 0 Give a positive score

Postby Fuzzy » Fri Mar 30, 2007 7:20 am

You dont need 1000 frames, or even 100. Use a canvas actor and draw the healthbar.
Mortal Enemy of IF....THEN(and Inspector Gadget)

Still ThreeFingerPete to tekdino
User avatar
Fuzzy
 
Posts: 1068
Joined: Thu Mar 03, 2005 9:32 am
Location: Plymostic Programmer
Score: 95 Give a positive score

Postby Kodo » Fri Mar 30, 2007 8:38 am

Fuzzy wrote:You dont need 1000 frames, or even 100. Use a canvas actor and draw the healthbar.


That's the best approach, but at the moment you'll find the bar glitchy at one end due to a bug in Game Editor. I think I read somewhere that Makslane has a fix for this due in the next version.
Inogames: http://www.inogames.com iOS gaming
Firetop Adventure (app store): http://itunes.apple.com/us/app/firetop- ... ?mt=8&ls=1
User avatar
Kodo
 
Posts: 449
Joined: Thu Oct 20, 2005 8:20 pm
Location: UK
Score: 23 Give a positive score


Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest

cron