How do I subtract from a different variable, each time my health variable reduces by a set amount ?

0 favourites
  • 3 posts
From the Asset Store
Easily store, modify, read and manipulate colors with Color Variables!
  • Hi all,

    Im wanting to link a Subhealth variable to my Health variable, so that each time my health is reduced by an amount, the Subhealth variable is reduced by an different amount.

    Both the health and subhealth start at the same number.

    i have got this working, but its a very long winded way of doing it by checking the health number and setting the subhealth number.

    is there a way to do this much simpler, maybe based on a percentage of the health? and how would i even work out a percentage of my max health would be?

    sorry if this all sound a bit dumb, im new to all this.


  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • The subhealth is reduced by a different amount, what amount? You must know as you said you have it working in a longwinded way.

  • Yeah I was overthinking the problem at hand. Slept on it and found a better way of giving me what I was after.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)