Code:
Problem description:
How can i create a life bar that will updata each time when hp change?
![]() Oct 18 2014, 8:29 am
|
|
I remember answering this same question for you back in August here. I take it you didn't understand the resources back then, or did you read them at all?
|
It's pretty straightforward. Whenever HP changes (you should know when this happens), update the life bar (you should know how to do this).
|
create some screen objects update the screen objects when you update your hp.
solved(); |
Kaiochao wrote:
It's pretty straightforward. Whenever HP changes (you should know when this happens), update the life bar (you should know how to do this). Not really |
Gokussj99 wrote:
create some screen objects update the screen objects when you update your hp. Not on screen i want it to be over base icon. |
There are a few ways to do this. What will you be using as the graphic for the health bar? An icon with a bunch of icon states? Or a rectangle for current health over another rectangle for maximum health? Or something else?
Either way, the question you asked requires some assumptions; that you have a property "health" that causes something to happen when it changes. mob/whatever |
mob/var |