The Daily Click ::. Forums ::. Klik Coding Help ::. Is it possible to make your own Health Percent counter?
 

Post Reply  Post Oekaki 
 

Posted By Message

JetpackLover



Registered
  01/03/2007
Points
  212
9th December, 2008 at 03:15:36 -

Sorry I gotta take up space on the boards for this but I couldn't find anything about it in articles section. What I'm asking is, is it possible to have a custom health percent counter that functions the same way the counter functions. What I mean is if I set the max to 100, or 1000, or whatever can it still function like the counter object. A related question I have is what if i wanted my HP meter to be more like a weight scale instead. So instead of numbers or bars it would move the little hand thingy over the current HP I had. Is that possible?

 
http://www.invincibletime.com/

Devlog for HD MMF Game Omulus. Check it out because it's gonna be awesome. http://omulus.tumblr.com/

Follow me on the twitters https://twitter.com/JetpackLover


RedEnchilada

formerly RedEchidna

Registered
  01/08/2008
Points
  301

VIP MemberWii OwnerThe Cake is a LiePicture Me This Round 24 Winner!
9th December, 2008 at 03:45:30 -

Yeah. Let's say the pointer is called HP, it's Alterable Value A is the health, AVB is the max health, the bar is HP Bar, and HP Bar is 100 pixels long.

Always:
HP: Set X position to X Left("HP Bar") + ((Value A("HP") * 100) / Value B("HP"))

That's how it works WAAAY back in TGF, anyways. Just rename the values Value A and Value B if you're using a newer program.

 
http://www.youtube.com/watch?v=WYrSD35vHo4
woooooooooooooooooaah maaaaaaaaaaaaaaaaaaaaan

JetpackLover



Registered
  01/03/2007
Points
  212
9th December, 2008 at 05:37:45 -

Is there anyway I can get a simple example of this in mfa format? Or maybe a visual representation of this? I'm not quite sure what you mean.

 
http://www.invincibletime.com/

Devlog for HD MMF Game Omulus. Check it out because it's gonna be awesome. http://omulus.tumblr.com/

Follow me on the twitters https://twitter.com/JetpackLover


Del Duio

Born in a Bowling Alley

Registered
  29/07/2005
Points
  1078

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!Evil klikerHasslevania 2!The OutlawSanta Boot
9th December, 2008 at 17:12:32 -

You might also have to enter your variables with a ".0" after them. That's the only was I was able to get mine to work.

 
--

"Del Duio has received 0 trophies. Click here to see them all."

"To be a true ninja you must first pick the most stealthy of our assorted combat suits. Might I suggest the bright neon orange?"

DXF Games, coming next: Hasslevania 2- This Space for Rent!

RedEnchilada

formerly RedEchidna

Registered
  01/08/2008
Points
  301

VIP MemberWii OwnerThe Cake is a LiePicture Me This Round 24 Winner!
10th December, 2008 at 01:33:06 -


Originally Posted by DudeHuge
Is there anyway I can get a simple example of this in mfa format? Or maybe a visual representation of this? I'm not quite sure what you mean.



http://redechidna.110mb.com/Misc/point.zip

Will CCA work? They can be opened in your program.

 
http://www.youtube.com/watch?v=WYrSD35vHo4
woooooooooooooooooaah maaaaaaaaaaaaaaaaaaaaan

JetpackLover



Registered
  01/03/2007
Points
  212
11th December, 2008 at 07:20:53 -

I think I did it, and I made it so there was a second pointer moving that rotates on its top.(I'm going to make the horizontal bar invisible. I'm not sure if I made it rotate right but it seems to work well enough. Anyone want to take a look and see if there is a better and more accurate way? Here it is.

http://www.megaupload.com/?d=0N9GLMPT

 
http://www.invincibletime.com/

Devlog for HD MMF Game Omulus. Check it out because it's gonna be awesome. http://omulus.tumblr.com/

Follow me on the twitters https://twitter.com/JetpackLover


JetpackLover



Registered
  01/03/2007
Points
  212
11th December, 2008 at 11:05:45 -

Oh dear, my code for this is totally worthless in a game that scrolls...I have no idea to make the angle of one pointer follow the other without using its x position. Anyone have any tips on what I can do?

Oh and to understand what I'm talking about you'll need to see the example I posted up top.

Edited by JetpackLover

 
http://www.invincibletime.com/

Devlog for HD MMF Game Omulus. Check it out because it's gonna be awesome. http://omulus.tumblr.com/

Follow me on the twitters https://twitter.com/JetpackLover

   

Post Reply



 



Advertisement

Worth A Click