Health Modifier and Variable Modifier
Hi!
Just a question. Can I use Variable Modifier to subtract life from the player, instead of using Health Modifier?
-
I don't know why you would be able to. It's not a thing that modifies health. ?
-
But you can use it to subtract and add. Not to use with Health Manager of course, but Variable Modifier and Variable. It works fine
My player has 3 lives, and each time I lose a life, I subtract 1 from Variables. And attach a number display to it. ? -
I guess his main question is if you can (in any way) modify health modifier in other way than by touching (object / zone) of the health modifier.
Because if there is no way to say (health = health +5) by some logic (for exampel by consuming item in your inventory), it makes use of the health manager pretty limited. -
You can make a variable called health and wire its current value output to the health managers current health input, then use a variable modifier to modify the health variable you made.
But it is a percentage i think so if the health variable is 0.50 then current health will be 50% of max health, for example max health is 100, health variable is 0.50, then current health will be 50.
An easy way to use this is to divide everything by 100 before you modify the health variable so 10 damage divided by 100 equals 0.10 use a signal manipulator in invert mode to change this to -0.10 then use a variable modifier to add that to the health variable, now you have subtracted 10 from current health.
Or you could just set damage to -0.10 but if you want to display damage stats it will display -0.10 damage, so its easier to divide because you can then use damage variable to write stats and it will display 10 damage
Please sign in to leave a comment.