This site requires JavaScript, please enable it in your browser!
Greenfoot back
spider65
spider65 wrote ...

2015/7/4

How do you make a health bar?

spider65 spider65

2015/7/4

#
I need a life bar where if the person gets the other person his health goes down. I now this is possible because I saw it in a program called tanks by Tanks&Unicorns.
danpost danpost

2015/7/4

#
A health bar is just a counter with a different type of display (image). Instead of textual content, it uses a visual representation of its value. So, create a counter class and have its image set appropriately depending on the value of the counter.
Zamoht Zamoht

2015/7/5

#
If you don't know how to write the code feel free to "steal" my health bar code. Just download this scenario.
spider65 spider65

2015/7/6

#
Thanks. But when I do it, it shows that it cannot find symbol - variable Style.
spider65 spider65

2015/7/6

#
Now I got it. But how do you make it when it hits the other object?
Zamoht Zamoht

2015/7/8

#
Do you have a method to detect collision?
You need to login to post a reply.