Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest WME version: WME 1.9.1 (January 1st, 2010) - download

Author Topic: A "Health Bar" in WME  (Read 651 times)

0 Members and 1 Guest are viewing this topic.

Chaos

  • supporter
  • Lurker
  • *
  • Karma: 1
  • Offline Offline
  • Gender: Male
  • Posts: 43
  • "WME rocks!"
    • View Profile
A "Health Bar" in WME
« on: September 06, 2019, 08:51:29 PM »

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!
Logged

mihaipuiucernea

  • Lurker
  • *
  • Karma: 1
  • Offline Offline
  • Gender: Male
  • Posts: 35
  • Currently working on Colors on Canvas
    • View Profile
Re: A "Health Bar" in WME
« Reply #1 on: September 06, 2019, 10:00:24 PM »

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.
Logged

eborr

  • Regular poster
  • ***
  • Karma: 4
  • Offline Offline
  • Posts: 195
    • View Profile
Re: A "Health Bar" in WME
« Reply #2 on: September 06, 2019, 11:52:35 PM »

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
Logged
 

Page created in 0.167 seconds with 24 queries.