Alice Community  

Go Back   Alice Community > Alice 2 > Share Objects

Reply
 
Thread Tools Display Modes
Old
zero00
Senior Member
 
zero00's Avatar
 
Status: Offline
Posts: 300
Join Date: Oct 2009
Default 06-07-2011, 10:23 PM

I don't think I added anything to the "decrease health" method to set it to zero if it went negative.
Somehow I never got around to doing that... Thanks!


==============Some of my Games and Ideas===========

Sky Warrior: http://www.alice.org/community/showthread.php?t=6291
Health Bars: http://www.alice.org/community/showthread.php?p=36968#post36968
Sky Warrior: Dual Force: http://www.alice.org/community/showthread.php?t=7174

Want to make your own space game? http://www.alice.org/community/showthread.php?t=6389
   
Reply With Quote
Mission Accomplished!
Old
zero00
Senior Member
 
zero00's Avatar
 
Status: Offline
Posts: 300
Join Date: Oct 2009
Default Mission Accomplished! - 06-07-2011, 10:57 PM

The healthbar project has been completed!
(Updated versions are possible, though)

and...

Now, a portable version has also been created!
This means you too can have your own healthbars in your Alice Worlds!
AND...you can use whatever kind of healthbar you want! (probably)

Download the "Healthbar_controler_v3.a2c" object and simply place it in your world!
(it's not that simple, though )

Look at the included world for a demonstration!

To make the Healthbar controllers work in your Alice worlds:
please look at the readme!
Attached Files
File Type: a2c Healthbar_control_v3.a2c (118.6 KB, 28 views)
File Type: a2w portable_healthbar_demo.a2w (288.7 KB, 20 views)
File Type: txt README!!!!!.txt (984 Bytes, 16 views)


==============Some of my Games and Ideas===========

Sky Warrior: http://www.alice.org/community/showthread.php?t=6291
Health Bars: http://www.alice.org/community/showthread.php?p=36968#post36968
Sky Warrior: Dual Force: http://www.alice.org/community/showthread.php?t=7174

Want to make your own space game? http://www.alice.org/community/showthread.php?t=6389

Last edited by zero00; 06-07-2011 at 11:27 PM.
   
Reply With Quote
Old
Mr Kidnapper
Senior Member
 
Status: Offline
Posts: 442
Join Date: Feb 2011
Default 06-08-2011, 01:33 AM

Not quite complete. Once the health bar reaches zero, it no longer grows back. This is likely because you're not about to multiply the size of 0 back to 100%, it would be the same as dividing by zero. I suggest to you that you place a "Landmark" health number, in which the width, or whatever dimension of the health bar is saved so that when the health bar has reached the irreversible zero, it can revert back to said dimension. Perhaps .001, or outright 100%?
   
Reply With Quote
Old
zero00
Senior Member
 
zero00's Avatar
 
Status: Offline
Posts: 300
Join Date: Oct 2009
Default 06-08-2011, 01:59 AM

Good point. Thanks, I'll try to fix this.
(I thought about trying to shrink it by 0.001 or something when it reached zero, but I didn't want to that, so I made it invisible instead! (I think))

Aside from that, did the health bar work for you?


==============Some of my Games and Ideas===========

Sky Warrior: http://www.alice.org/community/showthread.php?t=6291
Health Bars: http://www.alice.org/community/showthread.php?p=36968#post36968
Sky Warrior: Dual Force: http://www.alice.org/community/showthread.php?t=7174

Want to make your own space game? http://www.alice.org/community/showthread.php?t=6389

Last edited by zero00; 06-08-2011 at 02:32 AM.
   
Reply With Quote
Ok... now its done!
Old
zero00
Senior Member
 
zero00's Avatar
 
Status: Offline
Posts: 300
Join Date: Oct 2009
Default Ok... now its done! - 06-08-2011, 02:50 AM

The code for this things is getting more complicated...but I fixed it!

===Change============
-You increase the health when its at zero
====================

It works by resetting the object's health back to its original state and then subtracting a huge amount from it, so it seems like its been healed

A bit crude, but it works I guess...

Here's the fixed version:
There's also a demo showing the new healthbar controller!

The readme from post #12 still applies!
Attached Files
File Type: a2c Healthbar_control_v5.a2c (137.2 KB, 34 views)
File Type: a2w portable_healthbar_demo_fix.a2w (336.9 KB, 29 views)


==============Some of my Games and Ideas===========

Sky Warrior: http://www.alice.org/community/showthread.php?t=6291
Health Bars: http://www.alice.org/community/showthread.php?p=36968#post36968
Sky Warrior: Dual Force: http://www.alice.org/community/showthread.php?t=7174

Want to make your own space game? http://www.alice.org/community/showthread.php?t=6389

Last edited by zero00; 06-08-2011 at 05:37 AM.
   
Reply With Quote
Reply

Tags
bar, health points time gauge


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 ©2024, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.