Adding an additional animation to the 'config'

Started by Tiger-Boy, September 30, 2022, 04:32:51 AM

Previous topic - Next topic

Tiger-Boy

The char I am working on has two stand animations, of which can be chosen in the config text document.

I would like to add an additional stand animation.

The coding in the System State is the following:
Spoiler (click to show)

;====================<STANDING>====================
[Statedef 0]
type=S
physics=S
movetype=I
velset=0,0
sprpriority=0


[State 0, 1]
type = ChangeAnim
triggerall = var(57)!=0
trigger1 = Anim != 2 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0 ;Turn anim over
value = 2

[State 0, 1]
type = ChangeAnim
triggerall = var(57)=0
trigger1 = Anim != 0 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0 ;Turn anim over
value = 0

[State 0, Dead]
type=changestate
trigger1= !alive
value=5050

The coding in the CONFIG text document is:
Spoiler (click to show)

;Stance
[State 5900, Stance]
type = VarSet
trigger1 = 1
var(57) = 1 ; MODIFY THIS LINE
;0 = SF2 Stance
;1 = SF4 Stance


The animations already in the coding are 0 and 2. I would like to add animation 1.

How do I go about it?

Thanks in advanced.
"Remember kids; Curiosity created MUGEN!"

Check Out Cammy-Delta-Red-Development HERE

Odb718


[State 0, 1]
type = ChangeAnim
triggerall = var(57)=1
trigger1 = Anim != 1 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0 ;Turn anim over
value = 1

[State 0, 1]
type = ChangeAnim
triggerall = var(57)=2
trigger1 = Anim != 2 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0 ;Turn anim over
value = 2

[State 0, 1]
type = ChangeAnim
triggerall = var(57)=0
trigger1 = Anim != 0 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0 ;Turn anim over
value = 0

Make it a little easier on yourself. Make anim 2 be the value 2 and anim 1 be the value 1.
If you look, you'll see that var 57 was being checked if it wasn't 0. Meaning 1. Now we're checking exactly what value it is.

You could probably do this a lot easier by using
value = var(57)
to just line up


[State 0, 1]
type = ChangeAnim
trigger1 = Anim != Var(57) && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0 ;Turn anim over
value = Var(57)

See if that works for you.
Replace your two chunks of similar code with this one. If it doesn't work properly, try the 3.
vVv Gouken718 vVv SabreTooth718 vVv


Tiger-Boy

Quote from: Odb718 on October 01, 2022, 12:49:10 PM

You could probably do this a lot easier by using
value = var(57)
to just line up

[State 0, 1]
type = ChangeAnim
trigger1 = Anim != Var(57) && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0 ;Turn anim over
value = Var(57)

See if that works for you.
Replace your two chunks of similar code with this one. If it doesn't work properly, try the 3.

This one did the trick!  :msurprised:

No issues so far. Now anyone can choose one of the three stance animations available.

Thank you!  :bjugoi:

"Remember kids; Curiosity created MUGEN!"

Check Out Cammy-Delta-Red-Development HERE