Alice Community  

Go Back   Alice Community > Alice 2 > How do I...?

Reply
 
Thread Tools Display Modes
make a health bar
Old
the co0kie
Guest
 
Status:
Posts: n/a
Default make a health bar - 12-16-2010, 07:04 AM

how do you make a health bar?????

gracias
   
Reply With Quote
Old
jediaction
Senior Member
 
jediaction's Avatar
 
Status: Offline
Posts: 5,064
Join Date: Jul 2009
Location: Bel Air, Maryland
Default 12-16-2010, 10:44 AM

Well, What kind of health bar? My Halo game has a shield. Also, Making a health bar is relativly simple. Add 2 cubes. One of each side. Make it when ever you get hit, one cube moves towards the other a little bit, then when it gets to close, a death screen comes up. Simple as that!


Website: www.salokingames.com
FaceBook: www.facebook.com/SalokinGames
   
Reply With Quote
Old
SirThorfinn
Senior Member
 
SirThorfinn's Avatar
 
Status: Offline
Posts: 232
Join Date: Sep 2010
Location: Some where Unreal!
Default 12-16-2010, 11:21 AM

Or you can keep track with #'s, i think thats easier.


/|..__________________/\_
/ `---___________----_____|]-------<BLAM>------>
/_==o;;;;;;;;_______.:/
), ---.(_(__) /
// (..) ), ----"
//___//
//___//

<Youtube Page> (Not much there but maybe something you'll like) http://www.youtube.com/user/SirThorfinn?feature=mhum
<Xbox Live Gamertag> SirThorfinn

-----Friend of Thor-------------------------------------------
-----Spartans NEVER Die------------------------------------
All most anything on SirThorfinn is me... Almost.
   
Reply With Quote
Old
jediaction
Senior Member
 
jediaction's Avatar
 
Status: Offline
Posts: 5,064
Join Date: Jul 2009
Location: Bel Air, Maryland
Default 12-16-2010, 06:07 PM

Yes. Or that....I do both ways, which ever way works cookie. Your spanish?


Website: www.salokingames.com
FaceBook: www.facebook.com/SalokinGames
   
Reply With Quote
Old
haven812
Guest
 
Status:
Posts: n/a
Talking 12-16-2010, 06:57 PM

Here is a more common health bar that I just made. It is just two stretched out squares with one that shrinks every time the object takes damage. The third square is used to cover half the health bar, as it shrinks from both sides. Feel free to use this in any games.
Attached Files
File Type: a2w health.a2w (506.6 KB, 27 views)
   
Reply With Quote
Old
the co0kie
Guest
 
Status:
Posts: n/a
Default 12-23-2010, 06:48 AM

Quote:
Originally Posted by jediaction View Post
Yes. Or that....I do both ways, which ever way works cookie. Your spanish?
Quote:
Originally Posted by haven812 View Post
Here is a more common health bar that I just made. It is just two stretched out squares with one that shrinks every time the object takes damage. The third square is used to cover half the health bar, as it shrinks from both sides. Feel free to use this in any games.
thanks guys and no im not spanish... i just like saying gracias
   
Reply With Quote
Old
jediaction
Senior Member
 
jediaction's Avatar
 
Status: Offline
Posts: 5,064
Join Date: Jul 2009
Location: Bel Air, Maryland
Default 12-23-2010, 09:54 AM

ok...


Website: www.salokingames.com
FaceBook: www.facebook.com/SalokinGames
   
Reply With Quote
How About the Slider
Old
MrMoke
Senior Member
 
MrMoke's Avatar
 
Status: Offline
Posts: 501
Join Date: Sep 2007
Location: Austin, Texas
Default How About the Slider - 12-23-2010, 12:06 PM

There is actually a pretty cool slider in the Control section of Objects. With a little effort, you can move the knob to green to start, and then move in small steps to the red end.
   
Reply With Quote
Old
Revolt
Member
 
Revolt's Avatar
 
Status: Offline
Posts: 33
Join Date: Oct 2010
Thumbs up 12-23-2010, 12:08 PM

I find that a simple way to make a health bar is to use the "slider" object, turn it sideways, and just make a method called "healthDecreaseByOne" (or "healthIncreaseByOne", if you will be adding power-ups), where it moves the knob .10 meters to the left (or right, depends on how you turn the slider). The whole slider has about 6HP with that system, with each damage being 1. If you need more health, just edit the method so that it moves to the left or right by .05 instead of .10

I try to stay away from variables when possible, so this might be a good alternative for you if you don't need a very complex health system.


Rock, Paper, Scissors, Chuck Norris. Rock wins.

And by rock, I really mean Chuck Norris.
   
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Copyright ©2021, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.