Animated MP bar

Okamijoe

Member
Hello everyone!

I'm trying to create my very first OpenBOR game, and was wondering if there is a way to display the MP bar as an animated loop working exactly like it would as a default bar (same measurements and all).
I figured it would only be possible with script, which as an absolute beginner, I'm not very familiar with.
Is there an existing mod where this has been done, or a piece of code that can help me to implement this feature?

Thank you for your help!
 
Yeah, it would need scripting.
I can think in two ways to make it:

- using drawsprite function, under an updstescript/ondrawscript

- using an entity to display that animation and change it's scale to match the MP value - or using a  drawmethod clip to display only the part you want

But it depends of how this animation is.
 
Thank you for the reply!

Here's the first test animation I made.

giphy.gif


Code:
lbarsize        100 4 1					
mpbarsize	100 4 1

I'm still clueless in what is the best way to do this, since it should exactly react like the mp bar would, including mp charge as well as mp substraction for getting hit while blocking. I set all those things up in the engine already, will it be necessary to script every single possible condition of the mp bar just for the sake of having an animated overlay?
 
Okamijoe said:
I set all those things up in the engine already, will it be necessary to script every single possible condition of the mp bar just for the sake of having an animated overlay?

Well yes, but not at all like you're thinking. No matter what technique you use, the script needed will be fairly small, using a loop and some math work to dynamically adapt itself for the MP conditions. You don't (and wouldn't want to) script every possibility line by line. There are plenty of modules that do some elaborate HUD work you could look at for ideas. Kratus Streets of Rage project has some animations in the HUD IIRC, and he also uses some simple overlay tricks to make a nice gradient.

DC
 
Okamijoe said:
will it be necessary to script every single possible condition of the mp bar just for the sake of having an animated overlay?

If your animated MP is as simple as you shown above, the script should be not too complex
 
Back
Top Bottom