Hello
I’m currently working on a game (MX), that requires a dynamic health bar.
For instance, a user can at any time change the health bars full/total health from 1 - infinity. However, it must also at the same time keep a constant height of 10px/width of 100 px. Here’s the problem… I tried various ways to accomplish, but all had their same faulty side. I tried a variable controlled bar, frame by frame, and no luck…
I know this effect is possible( A game seen by a site). However, I’m completely stumped. I’ve checked Kirupa forums “search option” for the words “health bar, bar, health, hp”
I’ve tried this which comes probably the closest to my goal, but still fails.
- A rectangle and the outline. The rectangle with a var “bar”, and outline + bar with var “line”
- I then added a total = current; total being the max hp attained and current as the current depreciable hp.
- total = 100;
- _root.line.bar._width = total;