Coding Special Stance

Started by TehBazzard, June 18, 2008, 04:13:54 AM

Previous topic - Next topic

TehBazzard

How can I code a special stance to change the regular stance when you have a certain amount of Power Stock, Ala Reu's Evil Ken and Evil Ryu?

Cyanide

Override the standing state. Add in another changeanim similar to the one that's there with a triggerall = power >= value.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.

TehBazzard

This is taken from Evil Ryu's code.
[State 5050, 2]
type = ChangeAnim
trigger1 = anim = [5050,5059]
trigger1 = Vel Y >= ifelse(anim = 5050, 1, -2)
trigger1 = SelfAnimExist(anim+10)
value = anim+10
persistent = 0
The anim action number for the poses are 0 (for normal stance) and 1 (for special stance). What exactly is going on here?

Cyanide

State 5050 is not stand. Thats a falling state. You don't even need to be looking there. Statedef 0 please.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.

TehBazzard

Statedef 0
[Statedef 0]
type = S
physics = S
sprpriority = 0
I could not find statedef 1.

Cyanide

There won't be one. State 0 is all we're looking at. Post the whole thing, not just the bit you have. That way i can identify for you which bit ryu is using to change the animation.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.

TehBazzard

#6

[State 0, 1]
type = ChangeAnim
triggerall = power < 3000
trigger1 = Anim != 0 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0
value = 0
[State 0, 1]
type = ChangeAnim
triggerall = power >= 3000
trigger1 = Anim != 1 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0
value = 1
[State 0, 2]
type = VelSet
trigger1 = Time = 0
y = 0
[State 0, 3]
type = VelSet
trigger1 = abs(vel x) < 2
trigger2 = Time = 4
x = 0
[State 0, Var(32)reset]
type = Varset
trigger1 = time = 0
v = 32
value = 0
[State 0, Var(26)reset]
type = Varadd
trigger1 = time = 50
v = 26
value = 5
[State 0, Var(26)reset]
type = Varadd
trigger1 = time = 40
v = 26
value = 4
[State 0, Var(26)reset]
type = Varadd
trigger1 = time = 30
v = 26
value = 3
[State 0, Var(26)reset]
type = Varadd
trigger1 = time = 20
v = 26
value = 2
[State 0, Var(26)reset]
type = Varset
trigger1 = time = 0
v = 26
value = 0
[State 0, Var(26)reset]
type = Varset
trigger1 = time = 0
v = 26
value = 0
[State 0, Var(26)reset]
type = Varadd
trigger1 = time = 10
v = 26
value = 1
[State 0, Var(26)reset]
type = Varadd
trigger1 = time = 20
v = 26
value = 2
[State 0, Var(26)reset]
type = Varadd
trigger1 = time = 30
v = 26
value = 3
[State 0, Var(26)reset]
type = Varadd
trigger1 = time = 40
v = 26
value = 4
[State 0, Var(26)reset]
type = Varadd
trigger1 = time = 50
v = 26
value = 5

Cyanide

[State 0, 1]type = ChangeAnim
triggerall = power < 3000
trigger1 = Anim != 0 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0
value = 0

[State 0, 1]
type = ChangeAnim
triggerall = power >= 3000
trigger1 = Anim != 1 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0
value = 1

Thats all you're interested in. You'll be changing the power values, and the 1's


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.

TehBazzard

The power values are the power bar level the stance activates, but what are the ones?

Cyanide

trigger1 = Anim != 1
value = 1

Those, unless you plan to use 1 for your anim. Otherwise just power values.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.

TehBazzard

#10
Here is my Statedef

; Special Kyokugen Pose
[Statedef -1]
type = S
physics = S
sprpriority = 0

[State 0, 1]type = ChangeAnim
triggerall = power < 3000
trigger1 = Anim != 0 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0
value = 0

[State 0, 1]
type = ChangeAnim
triggerall = power >= 3000
trigger1 = Anim != -1 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0
value = 1

Seeing how the anim group of the special pose is -1, is this correct? The orignal pose anim group is 0.

Cyanide

Generally people use POSITIVE numbers for their animations. I think negatives work, but it's not normal. I posted 2 ones to be edited. You've edited one of them so no. that's wrong

Gonna post 3 examples now.

This would be correct if your special anim was 84398
[State 0, 1]
type = ChangeAnim
triggerall = power >= 3000
trigger1 = Anim != 84398 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0
value = 84398

This would be correct if it was 92
[State 0, 1]
type = ChangeAnim
triggerall = power >= 3000
trigger1 = Anim != 92 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0
value = 92

this would be correct if it was 1337
[State 0, 1]
type = ChangeAnim
triggerall = power >= 3000
trigger1 = Anim != 1337 && Anim != 5
trigger2 = Anim = 5 && AnimTime = 0
value = 1337

You see where you've gone wrong yet?


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.

TehBazzard

Cyandie, you're the best help in MUGEN creating! You're posts sound a tad mean at times, but I think you really have an inside as soft as silk!
MEGA +1!

Cyanide

I like to make people solve their own problems. If this means a little ridicule to at least make them try what's suggested i'll do it.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.