Wintermute Engine > Technical forum

A "Health Bar" in WME


I desperately need to add a Health bar into my game... I know that in Unity 3D there is way to add a Health bar in your project easily.  But still after so many years using WME I still havent find a way to do it (or is it even possible to do it? ) Im guessing it has something with adding a small personalized script into the project that works similar to a Health Bar. Thanks for your helP!

Never had to make one, but a very simple way would be to have a sprite made of 10 equal segments and simply reduce or increase the sprite by the required amount of segments, each time the health gets modified.

Of course the above example is cheating, and it would only work with the health being reduce or increased by 10, 20, 30 etc.... But it's a quick way to have a health bar.
I'm sure if you want something more complex you can also make it in WME.

to add to what has already been said there are two aspects to the health bar, one would be how you show it on the screen, and that could easily be a sprite with 10 frames, if we were to go by the example of showing steps of 10%, the other way would be how you represent it as data. I am not sure from your description as to whether you are looking at an overall health bar, or you want to attach a health bar to  npcs in some way


[0] Message Index

Go to full version