Alice Community  

Go Back   Alice Community > General Discussion > Questions and Comments

Reply
 
Thread Tools Display Modes
Health Bar
Old
JSayer
Guest
 
Status:
Posts: n/a
Default Health Bar - 06-16-2011, 11:46 AM

Okay, so I have made a health bar in alice... heres the code.
healthBar set value to 5
If Sphere is within 5 meters of gorrilaRobot
decrement healthBar by 1
Else Nothing
If healthBar==0
gorrilaRobot set isShowing to false
Else Nothing


I can't think of a problem, and I can't seem to fix it.
   
Reply With Quote
Old
DensetsuNoKaboom
Senior Member
 
DensetsuNoKaboom's Avatar
 
Status: Offline
Posts: 1,188
Join Date: May 2010
Location: e4eaf2
Default 06-16-2011, 12:24 PM

It will only check if the sphere is near the gorillaRobot the moment the if/Else happens. You'll need to create an event that says "while sphere is within 5 meters of gorillaRobot, begin: health bar decrement by 1, during: none, end: none", and another that says "while health bar <= 0, begin: gorillaRobot set isShowing to false, during: none, end: none".


Thank you for taking the time to read this signature. This signature loves you.
   
Reply With Quote
Old
shaydon
Senior Member
 
Status: Offline
Posts: 445
Join Date: Dec 2009
Location: Caspian Border
Default 06-16-2011, 10:01 PM

Quote:
Originally Posted by DensetsuNoKaboom View Post
It will only check if the sphere is near the gorillaRobot the moment the if/Else happens. You'll need to create an event that says "while sphere is within 5 meters of gorillaRobot, begin: health bar decrement by 1, during: none, end: none", and another that says "while health bar <= 0, begin: gorillaRobot set isShowing to false, during: none, end: none".
could'nt you just put it in a loop???
   
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 ©2020, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.