News:

MFG's Character of the Month: October 2026 Nominations

Main Menu

Command move problem

Started by AlumDixon, March 28, 2009, 07:57:22 PM

Previous topic - Next topic

AlumDixon

I'm tryin to make a projectile throw with a certain command.
Here's the code:
[command]
Name = "hatthrow"
Command = ~B,F,x

It don't work though but If I put it like just back front without the ~ it works. I also tried it without the ~
Any help?

Making Stick Figures in MS Paint is Fun....
Continuing Kung Lao =]

bushinryu

~ sign means neutral joystick position i think,it may be messing up with this kind of CMD back forward, not but if it is working without the ~ why dont you just leave it like this?

try ~20$B,F,x
(~20$B) = you have to hold back for 2 sec

or just make another cmd for Kung lao hat throw dude

good luck

AlumDixon

no i mean it back and forward is working without the ~ but doesnt work with it adding x

Making Stick Figures in MS Paint is Fun....
Continuing Kung Lao =]

Cyanide

Lemme guess. A punch comes out instead? Change the order of your changestates. More complex commands, like this one should be above less complex command changestates, like X.

This is detailed in the FAQ as well.


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.

AlumDixon

Quote from: Cyanide on March 28, 2009, 09:42:10 PM
Lemme guess. A punch comes out instead? Change the order of your changestates. More complex commands, like this one should be above less complex command changestates, like X.
This is detailed in the FAQ as well.
Quote from the FAQ. My attack isn't coming out
The .CMD file is read from top to bottom. If you have the changestate for a more complex command occuring after a simple command the simple command will be read in. As such, the complex command will never be read. Order should be complex then simple.


Does that mean i gotta put it at the very top before x?

Making Stick Figures in MS Paint is Fun....
Continuing Kung Lao =]

Bastard Mami


AlumDixon

weird because the code is on top of x  and all the other single buttons. What else could be wrong?

Making Stick Figures in MS Paint is Fun....
Continuing Kung Lao =]

Bastard Mami

there are two types of code, the par in which you define the command (that one does not matter) and the part where you put the changestate, that's the one in which order matters.

Byakko

I wonder if he even gave the correct triggers for the changestate.
If I struggled to the end of my determination, to the end of my way of life with my followers, if the result is ruin, then this ruin is inevitable. Grieve. Shed tears. But you cannot regret.

AlumDixon

i did because if i put the move as Back and forward, it works perfect but adding a button doesnt.

Making Stick Figures in MS Paint is Fun....
Continuing Kung Lao =]

Byakko

Then check E's (Frederica's) reply.
If I struggled to the end of my determination, to the end of my way of life with my followers, if the result is ruin, then this ruin is inevitable. Grieve. Shed tears. But you cannot regret.

AlumDixon

Ill just post my full cmd. Might help more.
Spoiler (click to show)
[Remap]
x = x
y = y
z = z
a = a
b = b
c = c
s = s

;-| Default Values |-------------------------------------------------------






[Defaults]
; Default value for the "time" parameter of a Command. Minimum 1.

; Default value for the "buffer.time" parameter of a Command. Minimum 1,
; maximum 30.
[command]
name = "as"
command = D,y
time = 15

command.buffer.time = 1


;-| Super Motions |--------------------------------------------------------
;The following two have the same name, but different motion.
;Either one will be detected by a "command = TripleKFPalm" trigger.
;Time is set to 20 (instead of default of 15) to make the move
;easier to do.

[Command]
name = "TripleKFPalm"
command = ~D, DF, F, D, DF, F, x
time = 20

[Command]
name = "SmashKFUpper"
command = ~D, DB, B, D, DB, B, x;~F, D, DF, F, D, DF, x
time = 20

[Command]
name = "SmashKFUpper"   ;Same name as above
command = ~D, DB, B, D, DB, B, y;~F, D, DF, F, D, DF, y
time = 20

;-| Special Motions |------------------------------------------------------
[Command]
name = "hatspwn"
command = B, F, x
time = 20

[Command]
name = "upper_x"
command = ~F, D, DF, x

[Command]
name = "upper_y"
command = ~F, D, DF, y

[Command]
name = "upper_xy"
command = ~F, D, DF, x+y

[Command]
name = "QCF_y"
command = ~D, DF, F, y

[Command]
name = "RoundHouse"
command = /B,b
time = 1

[Command]
name = "QCF_xy"
command = ~D, DF, F, x+y

[Command]
name = "QCB_x"
command = ~D, DB, B, x

[Command]
name = "QCB_y"
command = ~D, DB, B, y

[Command]
name = "QCB_xy"
command = ~D, DB, B, x+y

[Command]
name = "FF_ab"
command = F, F, a+b

[Command]
name = "FF_a"
command = F, F, a

[Command]
name = "FF_b"
command = F, F, b

[Command]
name = "sweep"
command = /B, a


;-| Double Tap |-----------------------------------------------------------
[Command]
name = "FF"     ;Required (do not remove)
command = F, F
time = 10

[Command]
name = "BB"     ;Required (do not remove)
command = B, B
time = 10

;-| 2/3 Button Combination |-----------------------------------------------
[Command]
name = "recovery";Required (do not remove)
command = x+y
time = 1

;-| Dir + Button |---------------------------------------------------------
[Command]
name = "down_a"
command = /$D,a
time = 1

[Command]
name = "down_b"
command = /$D,b
time = 1

;-| Single Button |---------------------------------------------------------
[Command]
name = "a"
command = a
time = 1

[Command]
name = "b"
command = b
time = 1

[Command]
name = "c"
command = c
time = 1

[Command]
name = "x"
command = x
time = 1

[Command]
name = "y"
command = y
time = 1

[Command]
name = "z"
command = z
time = 1

[Command]
name = "start"
command = s
time = 1
[Command]
name = "jumpkick"
command = x+UF

;-| Hold Dir |--------------------------------------------------------------
[Command]
name = "holdfwd";Required (do not remove)
command = /$F
time = 1

[Command]
name = "holdback";Required (do not remove)
command = /$B
time = 1

[Command]
name = "holdup" ;Required (do not remove)
command = /$U
time = 1

[Command]
name = "holddown";Required (do not remove)
command = /$D
time = 1

;---------------------------------------------------------------------------
; 2. State entry
; --------------
; This is where you define what commands bring you to what states.
;
; Each state entry block looks like:
;   [State -1, Label]           ;Change Label to any name you want to use to
;                               ;identify the state with.
;   type = ChangeState          ;Don't change this
;   value = new_state_number
;   trigger1 = command = command_name
;   . . .  (any additional triggers)
;
; - new_state_number is the number of the state to change to
; - command_name is the name of the command (from the section above)
; - Useful triggers to know:
;   - statetype
;       S, C or A : current state-type of player (stand, crouch, air)
;   - ctrl
;       0 or 1 : 1 if player has control. Unless "interrupting" another
;                move, you'll want ctrl = 1
;   - stateno
;       number of state player is in - useful for "move interrupts"
;   - movecontact
;       0 or 1 : 1 if player's last attack touched the opponent
;                useful for "move interrupts"
;
; Note: The order of state entry is important.
;   State entry with a certain command must come before another state
;   entry with a command that is the subset of the first.
;   For example, command "fwd_a" must be listed before "a", and
;   "fwd_ab" should come before both of the others.
;
; For reference on triggers, see CNS documentation.
;
; Just for your information (skip if you're not interested):
; This part is an extension of the CNS. "State -1" is a special state
; that is executed once every game-tick, regardless of what other state
; you are in.


; Don't remove the following line. It's required by the CMD standard.
[Statedef -1]

;===========================================================================
;---------------------------------------------------------------------------
;Smash Kung Fu Upper (uses one super bar)
;ƒXƒ}ƒbƒVƒ...EƒJƒ"ƒt[EƒEƒbƒp[iƒQ[ƒWƒŒƒxƒ‹,Pj
[State -1, Smash Kung Fu Upper]
type = ChangeState
value = 3050
triggerall = command = "SmashKFUpper"
triggerall = power >= 1000
triggerall = statetype != A
trigger1 = ctrl
trigger2 = hitdefattr = SC, NA, SA, HA
trigger2 = stateno != [3050,3100)
trigger2 = movecontact

;---------------------------------------------------------------------------
;Triple Kung Fu Palm (uses one super bar)
;ŽO—óƒJƒ"ƒt["Ë,«ŽèiƒQ[ƒWƒŒƒxƒ‹,Pj
[State -1, Triple Kung Fu Palm]
type = ChangeState
value = 3000
triggerall = command = "TripleKFPalm"
triggerall = power >= 1000
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = statetype != A
trigger2 = hitdefattr = SC, NA, SA, HA
trigger2 = stateno != [3000,3050)
trigger2 = movecontact





;===========================================================================
;This is not a move, but it sets up var(1) to be 1 if conditions are right
;for a combo into a special move (used below).
;Since a lot of special moves rely on the same conditions, this reduces
;redundant logic.
[State -1, Combo condition Reset]
type = VarSet
trigger1 = 1
var(1) = 0

[State -1, Combo condition Check]
type = VarSet
trigger1 = statetype != A
trigger1 = ctrl
trigger2 = (stateno = [200,299]) || (stateno = [400,499])
trigger2 = stateno != 440 ;Except for sweep kick
trigger2 = movecontact
var(1) = 1

;---------------------------------------------------------------------------
;Fast Kung Fu Knee (1/3 super bar)
;'¬,¢ƒJƒ"ƒt[R,èiƒQ[ƒWƒŒƒxƒ‹,P^,Rj
[State -1, Fast Kung Fu Knee]
type = ChangeState
value = 1070
triggerall = command = "FF_ab"
triggerall = power >= 330
trigger1 = var(1) ;Use combo condition (above)

;---------------------------------------------------------------------------
;Light Kung Fu Knee
;ƒJƒ"ƒt[R,èiŽãj
[State -1, Light Kung Fu Knee]
type = ChangeState
value = 1050
triggerall = command = "FF_a"
trigger1 = var(1) ;Use combo condition (above)

;---------------------------------------------------------------------------
;Strong Kung Fu Knee
;ƒJƒ"ƒt[R,èiŽãj
[State -1, Strong Kung Fu Knee]
type = ChangeState
value = 1060
triggerall = command = "FF_b"
trigger1 = var(1) ;Use combo condition (above)

;---------------------------------------------------------------------------
;Light Kung Fu Upper
;ƒJƒ"ƒt[EƒEƒbƒp[iŽãj
[State -1, Light Kung Fu Upper]
type = ChangeState
value = 1100
triggerall = command = "upper_x"
trigger1 = var(1) ;Use combo condition (above)

;---------------------------------------------------------------------------
;Strong Kung Fu Upper
;ƒJƒ"ƒt[EƒEƒbƒp[i‹­j

;---------------------------------------------------------------------------
;Fast Kung Fu Blow (1/3 super bar)
[State -1, Fast Kung Fu Blow]
type = ChangeState
value = 1220
triggerall = command = "QCB_xy"
triggerall = power >= 330
trigger1 = var(1) ;Use combo condition (above)

;---------------------------------------------------------------------------
;Light Kung Fu Blow
[State -1, Light Kung Fu Blow]
type = ChangeState
value = 1200
triggerall = command = "QCB_x"
trigger1 = var(1) ;Use combo condition (above)

;---------------------------------------------------------------------------
;RoundHouse MK
[State -1, RoundHouse]
type = ChangeState
value = 1210
triggerall = command = "RoundHouse"
trigger1 = var(1) ;Use combo condition (above)




;===========================================================================
;---------------------------------------------------------------------------
;Hat Thr






;Run Fwd
;ƒ_ƒbƒVƒ...
[State -1, Run Fwd]
type = ChangeState
value = 100
trigger1 = command = "FF"
trigger1 = statetype = S
trigger1 = ctrl

;---------------------------------------------------------------------------
;Run Back
;Œã'Þƒ_ƒbƒVƒ...
[State -1, Run Back]
type = ChangeState
value = 105
trigger1 = command = "BB"
trigger1 = statetype = S
trigger1 = ctrl

;---------------------------------------------------------------------------
;Kung Fu Throw
;"Š,°


;===========================================================================
;---------------------------------------------------------------------------
;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

;---------------------------------------------------------------------------
;Stand Strong Punch
;—§,¿‹­ƒpƒ"ƒ`
[State -1, Stand Strong Punch]
type = ChangeState
value = 210
triggerall = command = "y"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = (stateno = 200) && time > 5
trigger3 = (stateno = 230) && time > 6

;---------------------------------------------------------------------------
;Stand Light Kick
;—§,¿ŽãƒLƒbƒN
[State -1, Stand Light Kick]
type = ChangeState
value = 230
triggerall = command = "a"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = (stateno = 200) && time > 7
trigger3 = (stateno = 230) && time > 9

;---------------------------------------------------------------------------
;Standing Strong Kick
;—§,¿‹­ƒLƒbƒN
[State -1, Standing Strong Kick]
type = ChangeState
value = 240
triggerall = command = "b"
triggerall = command != "holddown"
trigger1 = statetype = S
trigger1 = ctrl
trigger2 = (stateno = 200) && time > 5
trigger3 = (stateno = 230) && time > 6

;---------------------------------------------------------------------------
;Taunt
[State -1, Taunt]
type = ChangeState
value = 195
triggerall = command = "start"
trigger1 = ctrl
;Hat
[State -1, hatspwn]
type = ChangeState
value = 6000
triggerall = command = "hatspwn"
trigger1 = statetype = S
;trigger1 = statetype = S && ctrl
trigger1 = ctrl

;---------------------------------------------------------------------------
;Crouching Light Punch
;,µ,á,ª,ÝŽãƒpƒ"ƒ`
[State -1, Crouching Light Punch]
type = ChangeState
value = 400
triggerall = command = "x"
triggerall = command = "holddown"
trigger1 = statetype = C
trigger1 = ctrl

;---------------------------------------------------------------------------
;Crouching Strong Punch
;,µ,á,ª,Ý‹­ƒpƒ"ƒ`
[State -1, Crouching Strong Punch]
type = ChangeState
value = 410
triggerall = command = "y" && command = "holddown"
triggerall = command = "holddown"
trigger1 = statetype = C && ctrl
trigger1 = ctrl
trigger2 = (stateno = 400) || (stateno = 430)
trigger2 = (time > 9) || (movecontact && time > 5)


;---------------------------------------------------------------------------
;Crouching Light Kick
;,µ,á,ª,ÝŽãƒLƒbƒN
[State -1, Crouching Light Kick]
type = ChangeState
value = 430
triggerall = command = "a"
triggerall = command = "holddown"
trigger1 = statetype = C
trigger1 = ctrl
trigger2 = (stateno = 400) || (stateno = 430)
trigger2 = (time > 9) || (movecontact && time > 5)

;---------------------------------------------------------------------------
;Crouching Strong Kick
;,µ,á,ª,Ý‹­ƒLƒbƒN
[State -1, Crouching Strong Kick]
type = ChangeState
value = 440
triggerall = command = "b"
triggerall = command = "holddown"
trigger1 = statetype = C
trigger1 = ctrl
trigger2 = (stateno = 400) || (stateno = 430)
trigger2 = (time > 9) || (movecontact && time > 5)

;---------------------------------------------------------------------------
;Jump Light Punch
;‹ó'†Žãƒpƒ"ƒ`
[State -1, Jump Light Punch]
type = ChangeState
value = 600
triggerall = command = "jumpkick"
trigger1 = statetype = A
trigger1 = ctrl
trigger2 = stateno = 600
trigger2 = statetime >= 7
trigger3 = stateno = 1350 ;Air blocking

;---------------------------------------------------------------------------
;Jump Strong Punch
[State -1, Jump Strong Punch]
type = ChangeState
value = 610
triggerall = command = "y"
trigger1 = statetype = A
trigger1 = ctrl
trigger2 = stateno = 600 || stateno = 630 ;jump_x or jump_a
trigger2 = movecontact
trigger3 = stateno = 1350 ;Air blocking

;---------------------------------------------------------------------------
;Jump Light Kick
[State -1, Jump Light Kick]
type = ChangeState
value = 630
triggerall = command = "a"
trigger1 = statetype = A
trigger1 = ctrl
trigger2 = stateno = 1350 ;Air blocking

;---------------------------------------------------------------------------
;Jump Strong Kick
;‹ó'†‹­ƒLƒbƒN
[State -1, Jump Strong Kick]
type = ChangeState
value = 640
triggerall = command = "b"
trigger1 = statetype = A
trigger1 = ctrl
trigger2 = stateno = 600 || stateno = 630 ;jump_x or jump_a
trigger2 = movecontact
trigger3 = stateno = 1350 ;Air blocking

Making Stick Figures in MS Paint is Fun....
Continuing Kung Lao =]

Cyanide

Quote[Command]
name = "hatspwn"
command = ~B, F, x
time = 20
Is the more normal way to do it. I shall assume that you've forgotten you deleted the changestate from your CMD before you posted it. As you have been using the move, perhaps you would care to add it back in where it's supposed to be?


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.

AlumDixon

i added the ~ line again. The changestate is still there.
[State -1, hatspwn]
type = Changestate
value = 6000
triggerall = command = "hatspwn"
trigger1 = statetype = S
;trigger1 = statetype = S && ctrl
trigger1 = ctrl


Making Stick Figures in MS Paint is Fun....
Continuing Kung Lao =]

Bastard Mami

slightly unrelated, never use statetype=S or statype =C, normally it's enough to use statetype != A then add a command = holddown check for crouching/standing attacks.

Byakko

#15
The ~ only means "release the key". So the command will be recognized when you
-hold (for as long as you want) or just press back
-release the back direction
-hit fwd
-hit x
in that order.

QuoteThe changestate is still there.
... Where "here" ? You put it in the middle of the taunt, after the block that goes
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
Mugen reads from top to bottom.
If you press back, forward, x, it will start reading the cmd file, find the block I just quoted, figure that you just pressed x, execute it, and never read the block that has
Quote;Taunt
[State -1, Taunt]
type = ChangeState
value = 195
triggerall = command = "start"
trigger1 = ctrl
;Hat
[State -1, hatspwn]
type = ChangeState
value = 6000
triggerall = command = "hatspwn"
trigger1 = statetype = S
;trigger1 = statetype = S && ctrl
trigger1 = ctrl
because that block is after the previous one.
Move the hatspwn block above the "Stand Light Punch" block.
If I struggled to the end of my determination, to the end of my way of life with my followers, if the result is ruin, then this ruin is inevitable. Grieve. Shed tears. But you cannot regret.

AlumDixon

holy fk it works. Thx very much. I thought i had to move the actual command for the buttons to get it right not the code of the change state. Thx again

Making Stick Figures in MS Paint is Fun....
Continuing Kung Lao =]

Cyanide

Sigh, i missed the hat throw changestate.

Disappointing that what you've now done to make it work is what we've been telling you to do the whole thread and what's in the FAQ

QuoteMy attack isn't coming out
The .CMD file is read from top to bottom. If you have the changestate for a more complex command occuring after a simple command the simple command will be read in. As such, the complex command will never be read. Order should be complex then simple.

As it seems this never penetrated properly, how would you advise it's reworded to be more understandable?


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.

Byakko

This is the problem
Quote from: alum2 on March 31, 2009, 12:49:15 PMweird because the code is on top of x  and all the other single buttons. What else could be wrong?
(he was only looking at the first part, it should be specified it's the statedef -1 that matters) And it's xhat E said afterward, this should have been the solution
Quote from: Frederica Bernkastel~ on March 31, 2009, 05:44:54 PM
there are two types of code, the par in which you define the command (that one does not matter) and the part where you put the changestate, that's the one in which order matters.
And I pointed it out again afterward too
Quote from: Byakko on March 31, 2009, 08:59:18 PM
Then check E's (Frederica's) reply.
So don't worry, the problem isn't you, it's alum2 who really didn't get it :P
If I struggled to the end of my determination, to the end of my way of life with my followers, if the result is ruin, then this ruin is inevitable. Grieve. Shed tears. But you cannot regret.