The Daily Click ::. Forums ::. Klik Coding Help ::. Health Bars
 

Post Reply  Post Oekaki 
 

Posted By Message

Jim Joe Johnson



Registered
  28/03/2004
Points
  45
20th May, 2004 at 22:12:35 -

I am making a game in MMF and would like to use health bars. In past games I have just had strings reading: "LIFE" followed by a number of lives, but I don't want to do that anymore. Does anyone have tips on making health bars? And, if possible, is there an example or tutorial showing how?

Image Edited by the Author.

 
"Nasty, tricksy Hobbitts!"

Bo Fu



Registered
  02/04/2004
Points
  413

VIP Member
21st May, 2004 at 00:14:24 -

It's pretty easy. Really easy way? Use a counter.

Just insert a horizontal (or vertical) bar counter by inserting a counter and changing its properties. You can change the color. Change the values as well to have 0 as the minimum and 100 (or however much health your character has) as the maxiumum. Everytime your player is hit, use the event editor to subtract from the counter object. When the counter hits 0 (or below), make the character death events.

If you want the health to carry over from level to level, make the counter global (in the Memory part of the object properties). Just make sure to set the health to 100 at the start of the game and whenever the player restarts the level from dying.

 
If wishes were fishes then we'd all smell like ladies' underwear.

Teapot

Does he even go here

Registered
  02/10/2003
Points
  2631

VIP Member
21st May, 2004 at 02:58:49 -

Seriously, what's wrong with lives objects? They can be converted to ini values.

 
n/a

Klikmaster

Master of all things Klik

Registered
  08/07/2002
Points
  2599

Has Donated, Thank You!You've Been Circy'd!VIP MemberPS3 Owner
21st May, 2004 at 12:04:28 -

whats wrong with counters?

 
n/a

ChrisB

Crazy?

Registered
  16/08/2002
Points
  5457
21st May, 2004 at 12:09:33 -

What's wrong with pen and paper?

 
n/a

Hargne



Registered
  20/05/2004
Points
  16
21st May, 2004 at 12:37:56 -

what's wrong with snakes?

 
"If we can't get to the top of the mountain, then the top must come to us!"

Kramy



Registered
  08/06/2002
Points
  1888
21st May, 2004 at 19:34:44 -

Lives objects can't display health percentages.

 
Kramy
   

Post Reply



 



Advertisement

Worth A Click