News:

MFG's Character of the Month: October 2026 Nominations

Main Menu

transformation code changeanim

Started by cake-kun, March 20, 2018, 11:56:13 PM

Previous topic - Next topic

cake-kun

when changing the animations of get hit states or walks or any of that stuff do i have to do one by one with this code
[State 11, 1] ;Change from turning animation
type = ChangeAnim
trigger1 = var(0) = 1
triggerall = anim != 100112
value = 100112
or is there a faster more efficient way of doing so?

Odb718

Yes & No.

Inside the StateDef you can set
Anim =
to what ever value you need. This is how MOST states switch animations. Some animations, very few, need to have a changeanim(2) outside of the statedef for what ever reason.
Some states will have both an anim set in the statedef and a changeanim in the state.

As for your example I dont know what var(0) is.... I'm not even sure var(0) works? Not sure if I've seen it used. But I'd set it up like
    [State 11, 1] ;Change from turning animation
    type = ChangeAnim
    triggerall = anim != 100112
    trigger1 = var(0) = 1
    value = 100112
You usually want triggerAll above the numbered triggers. You do want the check to make sure you only set the animation 1 time.

To answer your question; This ChangeAnim is pretty much the smallest changeanim you can go. So, No, there really isn't a more efficient way of changing anims.
Setting the Anim inside the StateDef is by far the fastest and easiest way. So, Yes, the easiest way is in the statedef.

vVv Gouken718 vVv SabreTooth718 vVv


inktrebuchet

#2
If the character has its transformed animation setup to be what ever the original animation is numbered + 10000, I believe you could use a code like this in -2. So your stand animation would = 0 and the transformer stand animation would be 10000; turn = 5 , transformed turn =10005 etc.


[State Transformed] ;Change animation to transformed animation.
type = ChangeAnim
trigger1 = var(0) = 1
trigger1 = anim < 10000
value = anim + 10000


This of course wouldn't work when the character is in a custom state.

If you are making this for 1.1b you might be interested in this thread, especial for custom states. http://mugenguild.com/forum/topics/asymmetry-transformations-and-custome-changes-are-possible-mugen--182052.0.html