Problem heal bar

Hello guys i wanted to know where can you find the code to create the life bar? That is, an enemy attacks and takes 1/5 of life and killing the targhet must touch it several times.

Thanks for any answers.

There are several ways to do life bars but as for basics you probably want to track an entities current and max health separately, as variables, so you can use a fraction of those to scale their health bar. If you want multiple entities all with their own health bar you can do this with linked objects. Roughly like this (ignore the color and timer stuff):

Hello sorry can you find a post with images with the code? Because explained so I can not figure out what to do.

Thanks anyway for your answer

I have already shared an example on the forum:

You can find more examples on the wiki:
wiki.compilgames.net/doku.php

Thanks a lot for the help is that I’m uncomplicated to copy from the help page many times leaves incomplete passes and i do not know how to complete the operation or it is complete and i’m almost sure some pass and i’m going to the ball i thank you.q

Use google translator so some passages are likely to be incorrect

I don’t understand a word :confused: :blush:
Are you having problems with the tutorials on the wiki or you don’t understand something about my example?

Yeah, google translator is horrible when it comes to long sentences, maybe you should translate only the words and try to make sentence that way :frowning:

The problem is that I understand English at first level but I can not correctly answer the syntax of text from almost always small typing errors.

Thanks anyway for the help I am now trying the code in my game and thank you for the help.