YesNoOk
avatar

Helper, Hitoverride trigger issue (Read 611 times)

Started by Plum, September 24, 2021, 06:41:27 pm
Share this topic:
Helper, Hitoverride trigger issue
#1  September 24, 2021, 06:41:27 pm
  • **
  • Variables > Boyfriends
Below is the code for a helper in their "hurt state", I'm trying to get this changestate to happen only once, after the fvar has dripped below 350, but it happens every time the helper is attacked and sent to a new state. The fvar is acting as HP. and I can't change the var(52) number since the helper's existence is tied to it. So, I'm left with feeling kind of lost, being working on this for almost a week now and I can't figure out the right set up for the triggers.

[State 999, ChangeState]
type = ChangeState
triggerall = fvar(0) <=  350
trigger1 = var(52)= 300
trigger1 =  time = 1
value = 1923
Last Edit: September 28, 2021, 05:37:45 pm by Plum
Re: Helper, Hitoverride trigger issue
#2  September 24, 2021, 09:06:34 pm
  • **
  • Blue is cool.
    • USA
Set a variable in state 1923 to 1, then add "triggerall = Var(x) != 1" to the changestate controller, where x is the variable set to 1. Assuming Var(0) was used, this code is added to state 1923:

Code:
[State 1923, VarSet]
type = VarSet
trigger1 = Var(0) != 1
v = 0
value = 1

Then the above changestate controller should be this:

Code:
[State 999, ChangeState]
type = ChangeState
triggerall = fvar(0) <=  350
triggerall = Var(0) != 1
trigger1 = var(52)= 300
trigger1 =  time = 1
value = 1923
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: Helper, Hitoverride trigger issue
#3  September 28, 2021, 05:37:39 pm
  • **
  • Variables > Boyfriends
This was perfect! I was wondering why I didn't get a notification or at least a small reply after two days. Thanks a bunch for the quick response as well, I can finally move on to something else.

Variables will never be my strong suit, no matter how often I use'em.