HB Bar. Literaly.

Talk about making games.

HB Bar. Literaly.

Postby Hblade » Sat Mar 17, 2007 4:26 pm

Hey, I made an HP bvar with an animation of 100 frames, and it goes down, but, I need to know how to make it stop when ever you get hit by somthing, Like, the ANimindex, I need to know how to use that. Can someone please help me out. I am making a megaman game.
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 DilloDude » Sat Mar 17, 2007 10:19 pm

Add a create actor event which changes the animation direction to stopped. On draw actor, set animpos to Health(or whatever variable you want).
Code: Select all
animpos = Player.Health;
Image
User avatar
DilloDude
 
Posts: 866
Joined: Tue Jan 24, 2006 9:51 am
Location: Nyerellion
Score: 58 Give a positive score

Postby Hblade » Sat Mar 17, 2007 10:33 pm

I have a new way. It's like, as soon as the bar reaches it's last point, then it's at the last point and the character is destroyed, but, it's like this. animpos = animpoos -1; and, if animpos is 100, then the character is like this.
Here is the HP bar. 1 with out hit, and one with hit 1 HP loss. Nevermind,. I won't pus post them.
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


Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest

cron