YesNoOk
avatar

Assist/Striker Health Values (Read 3941 times)

Started by Kazecat, December 05, 2021, 04:49:38 pm
Share this topic:
Assist/Striker Health Values
#1  December 05, 2021, 04:49:38 pm
  • **
  • I make characters with huge asses!
    • USA
    • www.patreon.com/Kazecat
Does anyone know a good equation to scale Assist/helper health values.  Say for instance someone wants to play at %150 life so they use options and set it accordingly.  I set my assist/striker health values with a variable on each character so it won't be affected by the option.   Is there any way to ensure that it scales when players adjust the Life value in options?
Re: Assist/Striker Health Values
#2  December 08, 2021, 05:16:07 am
  • **
  • Blue is cool.
    • USA
For int variables, change the value parameter to "Floor(X*((LifeMax+0.0)/Const(data.life)))", where X is the whatever number you want. Example:

Code:
[State 0, VarSet]
type = VarSet
trigger1 = 1
v = 0
value = Floor(100*((LifeMax+0.0)/Const(data.life)))

This will scale the variable if the Player's max life is higher or lower than their normal maximum life because of the life setting in the options.

If the variable is a float variable, the "Floor" part isn't really needed, like so:

Code:
[State 0, VarSet]
type = VarSet
trigger1 = 1
fv = 0
value = 100*((LifeMax+0.0)/Const(data.life))
Sometimes I listen to video game music more than I actually play the game.
Check out my Bonus Game & Characters!: http://mugenguild.com/forum/topics/streets-rage-2-bonus-game-11-chars-162092.0.html
IKEMEN Version: https://mugenguild.com/forum/topics/streets-rage-2-bonus-game-ikemen-version-update-728-196297.0.html
Re: Assist/Striker Health Values
#3  February 18, 2022, 06:26:20 pm
  • **
  • I make characters with huge asses!
    • USA
    • www.patreon.com/Kazecat
For int variables, change the value parameter to "Floor(X*((LifeMax+0.0)/Const(data.life)))", where X is the whatever number you want. Example:

Code:
[State 0, VarSet]
type = VarSet
trigger1 = 1
v = 0
value = Floor(100*((LifeMax+0.0)/Const(data.life)))

This will scale the variable if the Player's max life is higher or lower than their normal maximum life because of the life setting in the options.

If the variable is a float variable, the "Floor" part isn't really needed, like so:

Code:
[State 0, VarSet]
type = VarSet
trigger1 = 1
fv = 0
value = 100*((LifeMax+0.0)/Const(data.life))

Thank you I'm gonna apply this today and try it out.