Lifebar help...

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • Hi,

    Why don't you try with an active object and several frames ? each time you need to reduce life you change your frame. and if your frame equal 5 (for exemple) the ennemi dies.

  • You mean something like a healthbar above each enemy?

    Create a counter, set it to Horizontal bar, set minimum value to 0, and max to 100.
    Untick create from start.

    In the event editor, make code that makes sure there will always be as many Lifebars as there are enemies.

    * Number of Healthbar < Number of Enemies
    - Create Healthbar at 0.0

    * Number of Healthbar > Number of Enemies
    + Pick one Healthbar at random
    - Destroy Healthbar

    Use MMF2's automatic pairing system to position the Healthbars and to set the value.

    * Always
    - Healthbar: Set xpos to xpos of Enemy
    - Healthbar: Set ypos to ypos of Enemy - 30
    - Healthbar: Set value to (100.0 / Initial Enemy health) * Enemy Health

    Initial Enemy health is the ammount of health the Enemy starts with, while Enemy Health is the current value of health for the enemy. Both variables could be alterable values of Enemy.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!