[...]
The best way I can think of of detecting if ChangeAnim or ChangeAnim2 was used would be to use SelfAnimExist(Anim). This wouldn't work if you have the same action number in your air file as the one your opponent is using to put you into a Custom State. You could create a helper with that same action number and see if the AnimTime matches to check if it is the same anim but it won't always work.
As for Clsn boxes. They stay with the position not the display.
well, after all this, we can conclude that:
1.-When our char is in a custom state we can detect wheter the animation is within our AIR file or not
(maybe not accurately though?)
2.-if it's within our AIR we use
trigger1 = SelfAnimExist(Anim + 10000)
value = Anim + 10000*Var(Transformation_numer) ; Can adjust
Seems like this is what Aile&Vent uses, however it doesnt explain why it works in custom states.
3.-If it's not we use the offset trick.
[State -2, OffSet]
type = OffSet
y = 1000*Var(50)
trigger1 = Var(22)
;[...]
therefore all sprites that are normally used to create custom state animations will have a 1000 offset
all other sprites will go normally.
With this almost all problems seem solved, however I still wonder if there's anything else that can make this fail.
I also had an Idea but...
Spoiler, click to toggle visibilty
The only way things like this will work perfectly is that a new standard is made for all chars:
SysVar(3) is unused now, right? well, let's have it set to 0 always when in self state
[State -3, Custom State]
type = VarSet
trigger1 = 1
SysVar(3) = 0
then you just add this to all your throws in which you use ChangeAnim2:
[State xx, ChangeAnim2]
type = VarSet ;var set in a custom state yeah
trigger1 = 1
SysVar(3) = Anim
the only var set allowed in custom states --;
Now you can check for SysVar(3) in state -2 and modify whatever is needed.
I'm not saying this is practical, but if it had been standard when elecbyte created MUGEN
most of this problem wouldn't exist.