power up code problem

Started by TITAN MADRE, April 06, 2009, 06:11:11 AM

Previous topic - Next topic

TITAN MADRE

sorry i got a question:

CNS:

[Statedef 9000]
type = S
physics = S
velset = 0,0
anim = 195
ctrl = 0

[State 9000, PowerAdd]
type = PowerAdd
triggerall = command = "hold_x" && command = "hold_y"
trigger1 = power<powermax
value = time/10

[State 9000, ChangeState]
type = ChangeState
trigger1 = power>=powermax
trigger2 = command!="hold_x" || command = "hold_y"
value = 9001
ctrl = 0

[Statedef 9001]
type = S
physics = S
velset = 0,0
anim = 230
ctrl = 0


[State 9001, ChangeState]
type = ChangeState
trigger1 = AnimElem = 1
value = 0
ctrl = 1



CMD:


[Command]
name = "hold_x"
command = ~x
time = 30

[Command]
name = "hold_y"
command = ~y
time = 30




;power charge
[State -1, power charge]
type = ChangeState
value = 9000
trigger1 = power<const(data.power) || power<powermax
trigger1 = command = "hold_x" && command = "hold_y"
trigger1 = statetype = S && ctrl



^ in this case...nothing happend




but if delete this:

[Command]
name = "hold_x"
command = ~x
time = 30

[Command]
name = "hold_y"
command = ~y
time = 30



then :



hope can help me

Cyanide

~ is release, / is hold. Change to that. Also remember, your changestate order is important.


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.

TITAN MADRE

[Command]
name = "hold_x"
command = /$x
time = 1

[Command]
name = "hold_y"
command = /$y
time = 1



Quote;power charge
[State -1, power charge]
type = ChangeState
value = 9000
trigger1 = power<const(data.power) || power<powermax
trigger1 = command = "hold_x" && command = "hold_y"
trigger1 = statetype = S && ctrl

above this:

Quote;Stand Light Punch
;—§,¿Žãƒpƒ"ƒ`
[State -1, Stand Light Punch]
type = ChangeState
value = 200
triggerall = command = "x"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = stateno = 200
trigger2 = time > 6

result: looks like kfm is freeze in his stance when press the 2 buttons
dont charge

DEMAN

Quote from: Madre on April 06, 2009, 07:49:39 AM
[Command]
name = "hold_x"
command = /$x
time = 1

[Command]
name = "hold_y"
command = /$y
time = 1



Quote;power charge
[State -1, power charge]
type = ChangeState
value = 9000
trigger1 = power<const(data.power) || power<powermax
trigger1 = command = "hold_x" && command = "hold_y"
trigger1 = statetype = S && ctrl

above this:

Quote;Stand Light Punch
;—§,¿Žãƒpƒ"ƒ`
[State -1, Stand Light Punch]
type = ChangeState
value = 200
triggerall = command = "x"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = stateno = 200
trigger2 = time > 6

result: looks like kfm is freeze in his stance when press the 2 buttons
dont charge

[State -1, power charge]
type = ChangeState
value = 9000
trigger1 = power<const(data.power) || power<powermax
trigger1 = command = "hold_x" && command = "hold_y"
trigger1 = statetype = S && ctrl[/quote]


r u sure in [statedef 9000] ctrl is 0? if not it will keep change and restart state 9000.

and way "power<const(data.power)" is not a good idea when you have a partner with lower power then you, you will keep charging even power is full, but if it what you intend to do then it ok :)


† Today you beg for your life, but one day you will beg me for your death †

~*Ishida-Uryuu*~


                  ~*The Last Quincy*~         ~Sig by [TempesT]
My MUGEN shit:
MvC2 Tron Bonne, MvC Kim Kaphwan, Barns (Destruction Desire),
and Burai Yamamoto (Arranged)

Cyanide

trigger2 = command!="hold_x" || command = "hold_y"

That line is bad. Needs to be != "hold_y" as well. Otherwise it's checking that hold_y, is being held, which it is, so it's dropping you out, then you go back in again.


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.

TITAN MADRE

Quote from: Cyanide on April 06, 2009, 09:22:23 AM
trigger2 = command!="hold_x" || command = "hold_y"

That line is bad. Needs to be != "hold_y" as well. Otherwise it's checking that hold_y, is being held, which it is, so it's dropping you out, then you go back in again.

trigger2 = command != "hold_x" && command != "hold_y" ----- winner line
FLAWLESS VICTORY!!!  >:D

:D thank you very much again   :)