Transform mode

Started by BC, January 01, 2009, 04:58:09 PM

Previous topic - Next topic

BC

Im trying to implement zangiefs mech mode, but came across a problem, for now im not looking to code the whole mode just the new mode change and mech stance.

i have checked the code snippet archive but i dont think this problem im having is explained.

here is my code to change into mech mode..its very minimal because im just testing it out first.(im not worried about changing back yet)

[statedef 8000]
type = S
movetype = I
physics = S
velset = 0,0
anim = 8000
ctrl = 0
sprpriority = 1

[State 8000, VarSet]
type = VarSet
trigger1 = time = 0
v = 42
value = 1

[State 8000, ChangeState]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1


ok so obviously when var(42)=1 the mode is active...

now i changed back to stance after the mode transform animation

and i have this in the stance changeanim sctrl

[State 0, 1]
type = ChangeAnim
trigger1 = Anim != 0 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0 ;Turn anim over
value = ifelse(var(42)=1,50000,0) ;50000 being mech stance
persistent = 0

had to add persistent = 0 to stop him from freezing on the spot by constantly playing the anim.

all works fine untill i jump over p2 and p2's turn animation constantly plays so he is turning on the spot frantically


any tips on what ive done wrong? would i have to code a turn state or something?
Accepting commissions

Rajaa Retired

tell it to activate when your animation is not the animation of the new stance, the persistent will not be needed because that's whats causing that problem.

BC

Accepting commissions