YesNoOk
avatar

Assist/Striker disappear when player gets hit (Read 4034 times)

Started by NEX, July 07, 2022, 09:02:10 pm
Share this topic:

NEX

Assist/Striker disappear when player gets hit
#1  July 07, 2022, 09:02:10 pm
  • *
  • "You know, I'm something of a scientist myself."
Hello.
I have this assist character (helper) that pops in, attacks and leaves. Typical striker stuff.
As well as a HitOverride that would go into a helper "hurt state" which causes them to disappear just in case the helper gets hit by player 2.
Everything works perfectly as intended.

However, I want to add one more thing to complete it and that is:  [  if player 1 gets hit, the assist character would disappear  ]
I tried searching for some tutorial videos but I haven't found any solutions and I was hoping I would get answers here.

So basically, if player 1 gets hit, the helper would go into its hurt statedef.
Last Edit: July 08, 2022, 05:33:36 am by NEX
Re: Assist/Striker disappear when player gets hit
#2  July 07, 2022, 11:18:19 pm
  • **
  • Blue is cool.
    • USA
Add this to the helper code
Code:
[State 0, ChangeState]
type = ChangeState
trigger1 = IsHelper
trigger1 = root, MoveType = H
value = 9999
ctrl = 0
ignorehitpause = 1

Replace 9999 with the "hurt state" of the assist. If you want the assist to just disappear right on the spot when the player gets hit, use this instead:

Code:
[State 0, DestroySelf]
type = DestroySelf
trigger1 = IsHelper
trigger1 = root, MoveType = H
ignorehitpause = 1
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

NEX

Re: Assist/Striker disappear when player gets hit
#3  July 08, 2022, 05:33:29 am
  • *
  • "You know, I'm something of a scientist myself."
That first code was my solution. Thank you so much. I really appreciate it. o7

Solving thread.
Last Edit: July 08, 2022, 05:38:24 am by NEX