YesNoOk
avatar

transformation code changeanim (Read 12665 times)

Started by cake-kun, March 20, 2018, 11:56:13 pm
Share this topic:
transformation code changeanim
#1  March 20, 2018, 11:56:13 pm
  • avatar
  • *
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
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?
Re: transformation code changeanim
#2  March 21, 2018, 06:35:43 am
  • *****
  • Shame on you!
    • USA
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 Ryuko718 Updated 10/31/22 vVv
Re: transformation code changeanim
New #3  March 22, 2018, 04:02:54 am
  • ****
    • USA
    • twitter.com/inktrebuchet
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.

Code:
[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
Last Edit: March 22, 2018, 11:40:03 am by ink