Some Help with Hitflags.

Started by Momotaro, January 30, 2024, 07:29:04 PM

Previous topic - Next topic

Momotaro

I'm not sure how to have this result :
I would like a certain move to have different hitdefs (hitpause, velocity, damage...) depending on P2 pose.

The settings I used doesn't seems to work anymore.

I used

hitflag =  D for OTG move

hitflag = AF for air opponent or falling one (juggle etc)

hitflag = M for standing states

All these hitdefs use the same frame of animation and the same conditions.

What should I do ?
Thanks.

EDIT : SOLVED

VictorCYBR

#1
The settings you're using are correct. I'm just not sure if you also need F for OTG moves (hitflag = FD).
But what exactly is not working? The move is not connecting?
And since you said "anymore", was it working before?

A few general things to check for attacks:
Check if your move has a red box
Check the triggers (try using trigger1 = !time just for testing purposes)
Check if the state MoveType is A

mr_bourrepalestick

#2
Quote from: Momotaro on January 30, 2024, 07:29:04 PM
I'm not sure how to have this result :
I would like a certain move to have different hitdefs (hitpause, velocity, damage...) depending on P2 pose.

The settings I used doesn't seems to work anymore.

I used

hitflag =  D for OTG move

hitflag = AF for air opponent or falling one (juggle etc)

hitflag = M for standing states

All these hitdefs use the same frame of animation and the same conditions.

What should I do ?
Thanks.


Have you tried adding triggers to your hitdefs that refer to P2MoveType and/or P2StateType and/or P2StateNo ?
Like :
hitflag =  D for OTG move  > means the opponent is in states between 5100 and 5199 (default LYING type state numbers)


>>

[State .... ]
type=HitDef
trigger1 = AnimElem = ....
trigger1 = P2Stateno = [5100 , 5199]
attr = ...
hitflag = FD


EDIT :  even better, just tried it to make sure : 
"trigger1 = P2StateType = L"  for that one


[State .... ]
type=HitDef
trigger1 = AnimElem = ....
P2StateType = L
attr = ...
hitflag = FD
- samurais, swords & stuff ? → Another Blade

mr_bourrepalestick

or you could use another technique
here an example with different damage outputs :
10 for OTG
20 for falling
30 for standing or crouching opponent

damage = 10*(P2StateType=L) + 20*(P2StateType=F) + 30*(P2StateType=S||C)

- samurais, swords & stuff ? → Another Blade

Momotaro

Thanks for your reply guys.
I will test all of that.

Just as an information.
This is how the hitdefs are configured right now.
And the move only hits on OTG situation. (many values are WIP)

code
Spoiler (click to show)

;stand
[State 1240, 3]
type = HitDef
trigger1 = animelem = 5
attr = S, SA
damage = 35,3
hitflag = M
guardflag = MAFD
priority = 7
pausetime = 7,27
sparkno = 1
guard.sparkno = 41
;down.velocity = -1.1,-5.5
sparkxy = -20,-50
hitsound   = 5,9
guardsound = 6,0
animtype = hard;light
ground.type = low;high
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -3.5
air.velocity = -1.1,-5.5
envshake.time = 20
envshake.ampl = 4
envshake.freq = 70
attack.dist = 110
guard.dist = 110
attack.width = 15,15
air.fall = 1

;air
[State 1240, 3]
type = HitDef
trigger1 = animelem = 5
attr = S, SA
damage = 35,3
hitflag = AF
guardflag = MAFD
priority = 7
pausetime = 7,9
sparkno = 1
guard.sparkno = 41
sparkxy = -20,-50
hitsound   = 5,9
guardsound = 6,0
animtype = hard
ground.type = low
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -3.5
air.velocity = -1.1,-5.5
envshake.time = 20
envshake.ampl = 4
envshake.freq = 70
attack.dist = 110
guard.dist = 110
attack.width = 15,15
air.fall = 1

;down
[State 1240, 3]
type = HitDef
trigger1 = animelem = 5
attr = S, SA
damage = 35,3
hitflag = D
guardflag = MAFD
priority = 7
pausetime = 7,9
sparkno = 1
guard.sparkno = 41
down.velocity = -1.1,-5.5
sparkxy = -20,-50
hitsound   = 5,9
guardsound = 6,0
animtype = hard
ground.type = low
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -3.5
air.velocity = -1.1,-5.5
envshake.time = 20
envshake.ampl = 4
envshake.freq = 70
attack.dist = 110
guard.dist = 110
attack.width = 15,15
fall = 1
air.fall = 1


Momotaro

UPDATE ! It's fixed.

Thansk a lot for the help guys.
The main problem whas whatever I do, only the OTG version hits.

And when I remove otg and fall versions of hitdef, stand version works...
I tried your ideas but the result was not really what I needed.

Finally I used a var for it based on what you suggested (detecting  P2statetype)

this stuff fiwxed the problem.

[State 1240, 3]; pour adapter le hitdef à la position du P2 :  stand, air, liedown
type = VarSet
triggerall = time = 1
trigger1 = enemynear,StateType=A
;trigger1 = P2StateType=A
v = 2
value = 1


then triggering it for each hitdef.

Thanks again.

VictorCYBR

Since you put the OTG hitdef after the others, I think it was overriding them. Maybe you need different triggers for it to work...
Well, glad you solved it. ;P

mr_bourrepalestick

Glad to hear it worked out !
But watch out for your guardflags .

Quote from: Momotaro on January 31, 2024, 01:17:19 AM

code
;stand
[State 1240, 3]
type = HitDef
trigger1 = animelem = 5
...
guardflag = MAFD
...
...


guardflag should be H, L, M, or A
check hitdef documentation in sctrl file (docs folder)

Quote
guardflag = hit_flags (string)
This determines how P2 may guard the attack. hit_flags is a string containing a combination of the following characters:

"H" for "high", "L" for "low" or "A" for air. "M" (mid) is equivalent to saying "HL". If omitted, defaults to an empty string, meaning P2 cannot guard the attack.
- samurais, swords & stuff ? → Another Blade

Momotaro