Alice Community (http://www.alice.org/community/index.php)
-   Share Objects (http://www.alice.org/community/forumdisplay.php?f=8)

 zero00 06-07-2011 01:07 AM

Health Bars!

4 Attachment(s)
[B][SIZE="4"]Update: The finished health bars are on post #15 :D[/SIZE][/B]
Feel free to read this, though :D

This was an experiment that had defeated me every time I tried it...but now...

[B]I have figured out how to get health bars to work in Alice worlds[/B] (for the most part)!

I don't mean the kind of "health bars" made of a bunch of individual squares or what-have-you. I mean the 2D kind, similar to ones you would see in games like Street Fighter and the like.

I haven't [I]fully[/I] figured out the secret to this, but [B]progress is being made very quickly![/B]

Here are my experiments. Feel free to learn from them or use them however you want.

[B]"true_healthbar_exper.a2w"[/B] was my latest experiment that I used to figure this out! It's also kind of broken and slightly confusing, but it has some of basic functions for the healthbars to work. [B]"HUD_experiments.a2w"[/B] uses healthbars in a game-like environment!

 David B 06-07-2011 05:51 AM

Cool! Nice job! These would make great examples for someone who needs help with healthbars!

 zero00 06-07-2011 07:15 AM

Thanks!
BTW, the math for getting these things to work is really confusing. :P

 David B 06-07-2011 12:41 PM

[QUOTE=zero00;36935]Thanks!
BTW, the math for getting these things to work is really confusing. :P[/QUOTE]

I agree! My health bars never turn out that good!

 zero00 06-07-2011 02:50 PM

Making Progress...

1 Attachment(s)
Update:
The health bars are coming along nicely, though they are still confusing...

This is Experiment 2. Shoot the sphere (with the space bar) and the bar decreases accordingly. Press Enter to restore the sphere's health.

There's still a few things to figure out like what the bar will do when the enemy's health is fully depleted...

 David B 06-07-2011 03:12 PM

[QUOTE=zero00;36944]Update:
The health bars are coming along nicely, though they are still confusing...

This is Experiment 2. Shoot the sphere (with the space bar) and the bar decreases accordingly. Press Enter to restore the sphere's health.

There's still a few things to figure out like what the bar will do when the enemy's health is fully depleted...[/QUOTE]

This one is even better than the first one! Nice job!

 jediaction 06-07-2011 03:41 PM

I thought about making a health bar like this, but was always to lazy to do it. Cool! Now I see what it looks like!

 zero00 06-07-2011 08:46 PM

New and improved!

1 Attachment(s)
I think I've found the formula to resize the health bars!
It works much more reliably now!
Still need to figure what to do when it hits zero...:p

Here's the results:

 zero00 06-07-2011 09:12 PM

Could this be....

1 Attachment(s)
I think the Health bar is pretty much done now! :D :D

====Changes===================
You can now heal by any amount now!
Damage can go below zero, like "-8", but only once
=============================

Here is the pretty-much finished healthbar!
I'll work on a more easy-to-use version, soon. :D

 Mr Kidnapper 06-07-2011 09:20 PM

I always thought to abuse transparency glitches to make partial objects, at least from the view of the camera. But then until today I didn't know there was a resize variable to change an object height or width-wise. Found out from that one recoil world. :| How annoying.
How about a separate event that detects if it is less than 0, and sets it to 0?
But what I don't understand is what's wrong if it goes negative. Why is it bad? I let it damage deep into the negatives with multiple hits and nothing bad particularly happens.
Ha. Now all people need to do is design armor points and how it will affect damage.

All times are GMT -5. The time now is 04:13 PM.