YesNoOk
avatar

Weird behavior after custom float hitstate (Read 3544 times)

Started by TAD, December 02, 2023, 01:52:11 pm
Share this topic:

TAD

Weird behavior after custom float hitstate
#1  December 02, 2023, 01:52:11 pm
  • *
  • No more than a drop of seawater
    • Vietnam
Hello everyone,
I am currently programming a custom hit state that causes the opponent to float slightly (only applicable on grounded hits).
In other words, the opponent will float into the air, allowing for moves hitting in that state will be treated as an air hit. On the other hand, after some frames, the opponent will land, and moves hitting in that state will be treated as a grounded hit. (This is similar to the one in Guilty Gear -Strive-, if you understand what I mean)

Spoiler, click to toggle visibilty

So the code itself is fine (I guess). However, I get unfavorable results when used in tandem with moves that put the opponent in conditional state depending on which state the opponent is in before getting hit by them (for example, a move that ground bounces on air hit, and gives normal hit behavior otherwise).

Spoiler, click to toggle visibilty

For instance, I give State 220 the floating property, and State 240 the conditional property. When I hit the opponent with State 220, then time it so that the opponent lands when State 240 hits, in theory, the opponent should be in a generic standing hit state, right? But turns out, the opponent ground bounces, and the opponent receives grounded hit velocities. Weird, isn't it? If I remove the p2stateno line above, the opponent behaves as expected, but that's not what I desire.

I tried different measures, like editing the custom states, or replacing IfElse with Cond, but none of them work. So I want to ask if you have any clue as to why this happened?

Thanks in advance.
Re: Weird behavior after custom float hitstate
#2  December 02, 2023, 03:10:03 pm
  • ******
    • Portugal
    • network.mugenguild.com/pots/
It could be that state 240's Hitdef is activated before the other player becomes grounded. So the condition is checked while they're still in the air.
You can help with Ikemen GO's development by trying out the latest development build and reporting any bugs on GitHub.
My Mugen and Ikemen content can also be found here.

TAD

Re: Weird behavior after custom float hitstate
#3  December 03, 2023, 01:26:05 pm
  • *
  • No more than a drop of seawater
    • Vietnam
It works. Thanks for replying!

Although it's weird that the HitDef works this way. Well, whatever works, I guess.