Jump to content
  • 0

Making parry based off of high/medium/low instead of standing/crouching/aerial?


Go to solution Solved by PlasmoidThunder,

Question

Currently, I'm trying to implement a parry into a character that I am making. I used a couple of code snippets from MFG to base it off of and the implementation works. It uses a HitOverride state that takes attributes for standing attacks which I modified to include crouching attacks as well, but I would much rather be able to parry based off of an attack being high, medium, or low kind of like how it works in Street Fighter 3. Is there a way to do this with this method or am I going to have to look into doing it another way? I have put the states that I am using below.

 

Here are the states in my -2 Statedef

Spoiler
;---------------------------------------------------------------------------
; Parry Code 
; Adapted from https://mugenguild.com/forum/index.php?topic=43756.msg264689;topicseen#msg264689
; and https://mugenguild.com/forum/topics/help-parry-kfm-110033.0.html
;---------------------------------------------------------------------------
[State -2: Standing Parry]
type = HitOverride
trigger1 = StateType = S
trigger1 = ctrl = 1
trigger1 = command = "press_fwd" && command != "holdback" && command != "holddown" && command != "holdup" 
attr = SCA, AA, AP
slot = 0
stateno = 10000
time = 6
ignorehitpause = 1

[State -2: Crouching Parry]
type = HitOverride
trigger1 = StateType = C
trigger1 = ctrl = 1
trigger1 = command = "press_down" && command != "holdback" && command != "holdfwd" && command != "holdup" 
attr = CA, AA, AP
slot = 0
stateno = 10000
time = 6
ignorehitpause = 1

 

 

Here is the code for Statedef 10000

Spoiler
; Ground Parry
[Statedef 10000]
type = U
movetype = I
physics = U
anim = IfElse(StateType = S,10000,10001)
velset = 0,0
ctrl = 0
poweradd = 0
juggle = 0
facep2 = 1
hitdefpersist = 0
movehitpersist = 0
hitcountpersist = 0
sprpriority = 2

[State 10000, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = NoWalk
 
[State 10000, CtrlSet]
type = CtrlSet
trigger1 = (Time > 4) && (StateType = S)
value = 1
 
[State 10000, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA
 
[State 10000, Pause]
type = Pause
trigger1 = !Time
time = 8
movetime = 8

[State 10000: PlaySnd]
type = PlaySnd
trigger1 = !Time
value = S10000,0

[State 10000: ChangeState]
type = ChangeState
trigger1 = !AnimTime
ctrl = 1
value = IfElse(StateType = S,0,11)

 

 

I really want to have parrying be based off of hitflag types instead of strictly the state the enemy is in when they perform an attack. I have an uppercut on this character and having to exclusively do a low parry for that feels odd when it hits as a medium. I took a look at the trigger reference for GetHitVar and I'm wondering if that could come in handy here somehow. I tried throwing it on the trigger1 in the -2 states but it just made it so the parry doesn't work at all so I took it off. I'm wondering if anyone else has any input on this? Thanks to anyone who takes a look!

Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0
27 minutes ago, PlasmoidThunder said:

There is no known way to read hitflags. You'd have to hardcode those specific instances in, which is impractical outside of a fullgame.

That is unfortunate. I actually tried booting up GM's SF3 Ryu to try and see if I could low parry a medium attack to see how it would be done that way but it doesn't work. I am making a full game but I don't think that would be worth my time to go through and make an exception for every single instance with every single character. It might feel a little weird to play having to parry uppercuts with a low parry but I think I can work with it.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...