Jump to content

Life line (Life Scale) for your character


Woff
 Share

Recommended Posts

Hello gentlemen, let's whisk dust off our tired inquiring minds by the end of the week, and reflect on implementation of the "life line" of our characters. We are talking about the possibility of killing the player / enemy no with just one feed, but with several accurate hits.
I think it would be great possibility to realize more interesting scenario. How do you make such things, and if you have examples, show it please.

I found something similiar, so I will attach it bellow

post-10454-0-08353200-1411756970.jpg

Link to comment
Share on other sites

Here is a very simple implementation of a health bar (this is typically what they're called): http://jsfiddle.net/lewster32/shodch8x/

Really it looks simple and awesome. I'll try to understand.

Next step is  every time when interacting with the enemy, it can be applied to certain injuries and take away life on the basis of how you have shown above

thank you.

Link to comment
Share on other sites

If your enemy has a 'life' value, which starts at say 100, then you can set the health bar to match that value. You can then subtract as much health as you need to, and each time you do, check that the health is above 0 - if not, then your enemy is dead, and you should call the relevant routine to play the death animation and so on.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...