YesNoOk
avatar

Some Help with Hitflags. (Read 2644 times)

Started by Momotaro, January 30, 2024, 07:29:04 pm
Share this topic:
Some Help with Hitflags.
#1  January 30, 2024, 07:29:04 pm
  • *****
  • A.K.A. NED
  • I like to draw fighting game characters...
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
Last Edit: February 02, 2024, 11:34:08 am by Momotaro
Re: Some Help with Hitflags.
#2  January 30, 2024, 08:15:17 pm
  • ****
    • crepa.neocities.org

  • Online
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
Last Edit: January 30, 2024, 08:24:35 pm by Iono
Re: Some Help with Hitflags.
#3  January 30, 2024, 08:38:11 pm
  • **
    • France
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)


>>
Code:
[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

Code:
[State .... ]
type=HitDef
trigger1 = AnimElem = ....
P2StateType = L
attr = ...
hitflag = FD
- samurais, swords & stuff ? → Another Blade
Last Edit: January 30, 2024, 08:41:54 pm by mr_bourrepalestick
Re: Some Help with Hitflags.
#4  January 30, 2024, 09:34:36 pm
  • **
    • France
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
Re: Some Help with Hitflags.
#5  January 31, 2024, 01:17:19 am
  • *****
  • A.K.A. NED
  • I like to draw fighting game characters...
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 toggle visibilty
Re: Some Help with Hitflags.
#6  February 02, 2024, 11:30:47 am
  • *****
  • A.K.A. NED
  • I like to draw fighting game characters...
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.

Code:
[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.
Re: Some Help with Hitflags.
#7  February 02, 2024, 03:56:05 pm
  • ****
    • crepa.neocities.org

  • Online
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
Re: Some Help with Hitflags.
#8  February 03, 2024, 07:40:39 am
  • **
    • France
Glad to hear it worked out !
But watch out for your guardflags .


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
Re: Some Help with Hitflags.
#9  February 04, 2024, 10:44:10 am
  • *****
  • A.K.A. NED
  • I like to draw fighting game characters...
Thanks ! I will fix that !