-Guard states are hardcoded. You cannot get guardsparks and other guard specific info from any other way.
Player-type Triggers: During win poses, MUGEN does not recognize a "Player 2" / "Player 3" / "Player 4" / etc.
Meaning, triggers such as "P2Dist", "P4Life", etc will fail and result in a debug error "Nonexistent player".
However, trigger redirections such as "enemy," "enemynear," "PlayerID," - and even "target," still function correctly in Roundstate 4.
|Sometimes Mugen doesn't want to play the animation 5170.|
How to recreate the glitch:
- try to guard an aerial attack (either basic, or special or super) while you're in air; you don't have to guard the attack (the move doesn't have to connect), but just go into one of those states;
- now get hit by an attack that makes you fall on the ground. You don't have to jump for this to happen.
(no, it's not because the c.HK has a Trip function, it happens with many other attacks that make the enemy fall)
Et voilà! There's a bug!
Here's a video showing it.
(if you can't follow what I'm doing, the video's description might help you)
You have to code every custom state in all the attacks in order to not have this problem (eg Felineki's Akuma).
Edit: thanks to Daniel9999999 for discovering the root of the problem.
KFM uses sysvar(0) which gets used in the air guard states but doesn't get reset when the character is on the ground. Read the post below for a better understanding.
To fix this you need to add this piece of code under [StateDef -2]:
[State -2, System Variable Set]Make sure you're not using sysvar(0) for other things if you're adding this code into your character, or adapt it to your liking.
[State -2, System Variable Set]
type = VarSet
trigger1 = StateType != A
sysvar(0) = 0
ignorehitpause = 1
persistent = 0
channel = channel_no (int)
0 is a special channel reserved for player voices. Channel 0 voices are stopped when the player is hit. It's recommended you play your character's voice sounds on channel 0.
Winposes (Roundstate 4)
Match Ending: The match will not end until one player is in State 5150 (the loser), and one is in State 0 WITH ctrl = 1 (the winner).
The enemy can be controlled via custom states during winposes, but there are very specific criteria to make it work seamlessly (see my guide (http://mugenguild.com/forum/topics/control-p2-throughout-your-characters-win-pose-160621.0.html) here)
For the winning player, it is possible to continue a special "finisher-type" animation into the win pose phase (without changing to Stand anim), but the player must be in State 0 (add triggers preventing change to stand anim), and with ctrl (add triggers in .cmd to prevent input in this scenario). A workaround for the latter is to just set ctrl=0, then toggle it to ctrl=1 intermittently for 1 tick (to trigger winpose phase).
State 5150 (lying down defeated)
When the defeated opponent is in State 5150, MUGEN does not recognize a "Player 2" / "Player 3" / "Player 4". Meaning, triggers such as "P2Dist", "P4Life", etc will fail and result in a debug error "Nonexistent player".
However, trigger redirections such as "enemy," "enemynear," "PlayerID," - and even "target," still function correctly in this state.
Thanks @2OS for correcting my initial flawed description
In a custom state, Explods do not scale to the active coordinate space. A low res character in a high res environment will be drawn tiny / a high res character in a low res environment will be drawn enormous. There are no triggers that can be used to detect the scale factor, because all relevant values returned by these triggers are already scaled, regardless of being used by Player 1 or from a custom state. Therefore, do not use Explods to draw the enemy - only use Changeanim / Changeanim 2 (unless in a fullgame environment where coordinate space is always uniform).
Stages that move up and down
On stages that have vertical movement (which bob up and down), all players (including helpers) are constantly affected by the movement, regardless of state type, if they are in the air, etc. Explods, however, are NOT affected by this type of stage movement - therefore it is recommended to always bind Explods to the player when they are intended to be positioned relative to the player, because otherwise they may look ridiculous when used on such levels.