Jump to content

[CNS Introduction] State 200 - State 640


Ryon

Recommended Posts

A Majority of mugen coding can simple be done by Copying and Pasting, and changing values.

Kung Fu Man explains the basic definition for all of his stand light punch state.

;---------------------------------------------------------------------------

; Stand Light Punch

; CNS difficulty: easy

[statedef 200]

type = S ;State-type: S-stand, C-crouch, A-air, L-liedown

movetype= A ;Move-type: A-attack, I-idle, H-gethit(used for custom states such as throws or grab supers)

physics = S ;Physics: S-stand, C-crouch, A-air (with A gravity is automatically applied, bringing the character to the ground.

juggle = 1 ;Number of air juggle points move takes by default players have 15, so 15-1 = 14, he has 14 points left after he hits with this move.

;Commonly-used controllers:

velset = 0,0 ;Set velocity (x,y)

ctrl = 0 ;1 = player can still control the character during this move. 0 = player has no control.

anim = 200 ;Change animation

poweradd = 10 ;Power to add to the super guage.

sprpriority = 2 ;Set p1's sprite layering priority to 2 (in front)

[state 200, 1]

type = HitDef ; Hit Definition, used for basic hit codes.

trigger1 = AnimElem = 3 ; Animation Element, 3. is when this move will hit.

attr = S, NA ;Attribute: Standing, Normal Attack

damage = 23, 0 ;Damage that move inflicts, guard damage

animtype = Light ;Animation type: Light, Medium, Heavy, Back

guardflag = MA ;Flags on how move is to be guarded against

hitflag = MAF ;Flags of conditions that move can hit

priority = 3, Hit;Attack priority: 0 (least) to 7 (most), 4 default

;Hit/Miss/Dodge type (Def: Hit), higher numbers will always beat out lower numbers.

pausetime = 8, 8 ;Time attacker pauses, time opponent shakes

sparkno = 0 ;Spark anim no related to fightfx.air, use "s" before the number will allow you to use hitsparks from within the PLAYERS SFF/AIR file.

sparkxy = -10, -76 ;X-offset for the "hit spark" rel. to p2,

;Y-offset for the spark rel. to p1

hitsound = 5, 0 ;Sound to play on hit; adding "s" before will let you use a sound from the players .snd file "hitsound = s10,0"

guardsound = 6, 0 ;Sound to play on guard, same rule applies as above.

ground.type = High ;Type: High, Low, Trip, this decides what animation set to use for the player being hit. if you kick low you should have ground.type = low, having high will look wrong.

ground.slidetime = 5 ;Time that the opponent slides back

ground.hittime = 11 ;Time opponent is in hit state

ground.velocity = -4 ;Velocity at which opponent is pushed

airguard.velocity = -1.9,-.8 ;Guard velocity in air (def: (air.xvel*1.5, air.yvel/2))

air.type = High ;Type: High, Low, Trip (def: same as ground.type)

air.velocity = -1.4,-3 ;X-velocity at which opponent is pushed,

;Y-velocity at which opponent is pushed

air.hittime = 15 ;Time before opponent regains control in air

[state 200, 2]

type = PlaySnd ; This trigger is simple and straight forward it lets you play a sound.

trigger1 = Time = 1

value = 0, 0 ;When using a PlaySnd sctrl you automatically tell mugen your using a sound from the players snd. I BELIEVE you can use "f" in this case to use a sound from the common.snd like this "value = f5,0".

[state 200, 3]

type = ChangeState

trigger1 = AnimTime = 0

value = 0

ctrl = 1

; The above change state explains "Change players state to 0 (stand) after the animation is over and give him control agian.

;---------------------------------------------------------------------------

; Standing strong punch

; CNS difficulty: easy

; Note the width controller. It makes KFM's push box larger, so he doesn't

; stand so close to the opponent. Hit Ctrl-C and look at the red bar at his

; feet.

; The sprpriority for this state is at -1, instead of the usual 2 for

; attacks. This makes KFM appear behind the opponent initially.

; The SprPriority controller in [state 210, 4] brings KFM to the front when

; his arm has swung over.

; To stop KFM from pausing in his swing frame, there is a ChangeAnim in

; [state 210, 3] that detects if the hit has come in contact with the

; opponent during that frame, and switches to the next animation element

; (notice the elem=6 parameter). If you don't see what I mean, try commenting

; out that controller, then hit someone with this attack.

[statedef 210]

type = S

movetype= A

physics = S

juggle = 4

poweradd= 30

ctrl = 0

velset = 0,0

anim = 210

sprpriority = -1

[state 210, Width]

type = Width

trigger1 = (AnimElemTime (2) >= 0) && (AnimElemTime (7) < 0)

value = 15,0

;The trigger above is a really tight trigger which makes the width active for a very short ;time. The width code is activated is activate when Animation Element 2 is MORE THAN or ;EQUALto time = 0 (at least 1 tick) AND Animation Element 7 is LESS THAN 0 ticks (ticks for ;the element, not the entire animation)

;So it restricts the width from being used other wise.

[state 210, 1]

type = PlaySnd

trigger1 = Time = 2

value = 0, 4

[state 210, 2]

type = HitDef

trigger1 = AnimElem = 3

attr = S, NA

animtype = Medium

damage = 57

guardflag = MA

pausetime = 12,12

sparkno = 1

sparkxy = -10,-70

hitsound = 5,2

guardsound = 6,0

ground.type = High

ground.slidetime = 12

ground.hittime = 16

ground.velocity = -5.5

air.velocity = -2.5,-4

forcenofall = 1

; This code is to change the animation of the player, based on what there trigger is, in this case if the move hits, the character

Wiill change animation to the same animation, except they will be 1 element AFTER the hit. this way they are not affected by the hitpause.

[state 210, 3]

type = ChangeAnim

trigger1 = AnimElemTime(5) > 0 && AnimElemTime(6) <= 0

trigger1 = movecontact

ignorehitpause = 1

persistent = 0

value = 210

elem = 6

;However... hitpause = 0,12 gives the same effect, and does not require the above code.

[state 210, 4]

type = SprPriority ; Sprite Priority, tells the sprites what layer priority it has over the other players.

trigger1 = AnimElem = 5

value = 2 ; -1 = back, 0 = behind, 1 = normal layer, 2 = infront layer. in this case the sprite priority is changed to 2 infront of the other player.

[state 210, 5]

type = ChangeState

trigger1 = AnimTime = 0

value = 0

ctrl = 1

;---------------------------------------------------------------------------

; Standing light kick

; CNS difficulty: easy

[statedef 230]

type = S

movetype= A

physics = S

juggle = 4

poweradd= 11

ctrl = 0

velset = 0,0

anim = 230

sprpriority = 2

[state 230, 1]

type = PlaySnd

trigger1 = Time = 2

value = 0, 1

[state 230, 2]

type = HitDef

trigger1 = Time = 0

attr = S, NA

animtype = Medium

damage = 26

guardflag = MA

pausetime = 12,12

sparkno = 0

sparkxy = -10,-37

hitsound = 5,1

guardsound = 6,0

ground.type = Low

ground.slidetime = 10

ground.hittime = 14

ground.velocity = -5

air.velocity = -2.5,-3.5

[state 230, 3]

type = ChangeState

trigger1 = AnimTime = 0

value = 0

ctrl = 1

;Now when you look at the above state you relize that its merely a copy of the standing light punch state. except without all the detailed explainations.

;---------------------------------------------------------------------------

; Standing strong kick

; CNS difficulty: easy

[statedef 240]

type = S

movetype= A

physics = S

juggle = 5

poweradd= 30

ctrl = 0

velset = 0,0

anim = 240

sprpriority = 2

[state 240, 1]

type = PlaySnd

trigger1 = Time = 2

value = 0, 1

[state 240, 2]

type = HitDef

trigger1 = Time = 0

attr = S, NA

animtype = Medium

damage = 63

guardflag = MA

pausetime = 12,12

sparkno = 1

sparkxy = -10,-60

hitsound = 5,2

guardsound = 6,0

ground.type = Low

ground.slidetime = 12

ground.hittime = 17

ground.velocity = -6

air.velocity = -2.2,-3.2

[state 240, 3]

type = PosAdd ; Position Add is used for when the players feet move during the animation.

By alignment, all sprites should be centered, with these feet on the axis. for moves where the character moves forward by stepping. posadd is strongly recommended you use it. this way if the character gets hit. he wont appear graphically wrong.

trigger1 = AnimElem = 7 ; The players position will change on animation element 7, to the value below.

x = 12 ; PosAdd add's the position to the current players position so for example 100 is the players position, x = 12, which would mean players new position would be 112.

[state 240, 4]

type = ChangeState

trigger1 = AnimTime = 0

value = 0

ctrl = 1

;---------------------------------------------------------------------------

;Crouching light punch

; CNS difficulty: easy

; Description: Simple crouching attack. The HitDef's guardflag parameter

; is set to "L", meaning that the move can only be guarded low

; (crouching), and not by standing or jumping opponents.

; Like for all light attacks, it's a good idea to keep the slidetime

; and hittime parameters at a smaller number, so the opponent isn't

; stunned for too long. For all crouching attacks you have to

; remember to set the attr parameter to indicate that it is crouching

; attack. In this case, "C, NA" stands for "crouching, normal attack".

; The HitDef's priority is set at 3, instead of the default of 4,

; so this attack has a lower priority than most others, meaning

; KFM will get hit instead of trading hits with his opponent if

; their attack collision boxes (Clsn1) intersect each other's Clsn2

; boxes at the same time.

[statedef 400]

type = C

movetype= A

physics = C

juggle = 5

poweradd= 8

ctrl = 0

anim = 400

sprpriority = 2

[state 400, 1]

type = PlaySnd

trigger1 = Time = 1

value = 0, 0

[state 400, 2]

type = HitDef

trigger1 = Time = 0

attr = C, NA

damage = 23

priority = 3

animtype = Light

hitflag = MAF

guardflag = L ;as explained above this is a LOW move and has to be guarding (L)ow.

pausetime = 10,11

sparkno = 0

sparkxy = -10,-42

hitsound = 5,0

guardsound = 6,0

ground.type = Low

ground.slidetime = 4

ground.hittime = 9

ground.velocity = -4

air.velocity = -1.5,-3

[state 400, 3]

type = CtrlSet ; This is here strictly to give some comboability for button mashers who crouch and mash LP or HP.

trigger1 = Time = 6

value = 1

[state 400, 4]

type = ChangeState

trigger1 = AnimTime = 0

value = 11

;---------------------------------------------------------------------------

;Crouching strong punch

; CNS difficulty: easy

; Description: This is a 2-hit move. It is done by having two HitDefs

; triggered, one for each frame of animation that hits.

; Notice how the first hit cannot be guarded by an opponent in the

; air, because of the "M" in the guardflag, meaning it can only

; be guarded "middle". The second hit has an "MA" guardflag, so

; it can be guarded both on the ground and in the air.

[statedef 410]

type = C

movetype= A

physics = C

juggle = 6

poweradd= 25

ctrl = 0

anim = 410

sprpriority = 2

[state 410, 1]

type = PlaySnd

trigger1 = Time = 1

value = 0, 0

;This is the first hit, triggered on the 3rd element of animation.

[state 410, 2]

type = HitDef

trigger1 = AnimElem = 3

attr = C, NA

damage = 37

animtype = Medium

hitflag = MAF

guardflag = M

pausetime = 12,12

sparkno = 1

sparkxy = -10,-55

hitsound = 5,2

guardsound = 6,0

ground.type = Low

ground.slidetime = 12

ground.hittime = 17

ground.velocity = -4

air.velocity = -3,-4

;This is the second hit, triggered on the 4th element of animation.

[state 410, 3]

type = HitDef

trigger1 = AnimElem = 4

attr = C, NA

damage = 36

animtype = Medium

hitflag = MAF

guardflag = MA

pausetime = 12,12

sparkxy = -10,-83

hitsound = 5,2

guardsound = 6,0

ground.type = High

ground.slidetime = 12

ground.hittime = 17

ground.velocity = -7

air.velocity = -3,-4

[state 410, 4]

type = ChangeState

trigger1 = AnimTime = 0

value = 11

ctrl = 1

;---------------------------------------------------------------------------

;Crouching light kick

; CNS difficulty: easy

[statedef 430]

type = C

movetype= A

physics = C

juggle = 5

poweradd= 11

ctrl = 0

anim = 430

sprpriority = 2

[state 430, 1]

type = PlaySnd

trigger1 = Time = 1

value = 0, 0

[state 430, 2]

type = HitDef

trigger1 = Time = 0

attr = C, NA

damage = 28

animtype = Light

hitflag = MAFD

guardflag = L

pausetime = 12,12

sparkno = 0

sparkxy = -10,-8

hitsound = 5,1

guardsound = 6,0

ground.type = Low

ground.slidetime = 6

ground.hittime = 10

ground.velocity = -5

air.velocity = -2,-3

down.velocity = -5,0

down.hittime = 22

[state 430, 3]

type = ChangeState

trigger1 = AnimTime = 0

value = 11

ctrl = 1

; Yup! even now i'm sure you've noticed a majority of this is copy and paste.

;---------------------------------------------------------------------------

;Crouch Strong Kick

; CNS difficulty: easy

; Description: This move uses "Trip" for the "ground.type" parameter in

; its HitDef. It's a special type that puts the opponent in a tripped

; animation as he falls. Also, the hitflag parameter in the HitDef

; is set to "MAFD". The "D" indicates that a downed opponent can be

; hit by the attack.

[statedef 440]

type = C

movetype= A

physics = C

juggle = 7

poweradd= 35

ctrl = 0

anim = 440

sprpriority = 2

[state 440, 2]

type = PlaySnd

trigger1 = Time = 2

value = 0, 2

[state 440, 3]

type = HitDef

trigger1 = Time = 0

attr = C, NA

damage = 72

hitflag = MAFD

guardflag = L

pausetime = 12,12

sparkno = 1

sparkxy = -5,-10

hitsound = 5,2

guardsound = 6,0

ground.type = Trip

ground.slidetime = 10

ground.hittime = 17

ground.velocity = -1.5,-2

air.velocity = -1.2,-3

guard.velocity = -5

fall = 1

[state 440, 4]

type = ChangeState

trigger1 = AnimTime = 0

value = 11

ctrl = 1

;---------------------------------------------------------------------------

;Jump Light Punch

; CNS difficulty: easy

[statedef 600]

type = A

movetype= A

physics = A

juggle = 2

poweradd= 5

ctrl = 0

anim = 600

sprpriority = 2

[state 600, 1]

type = PlaySnd

trigger1 = Time = 1

value = 0, 0

[state 600, 2]

type = HitDef

trigger1 = Time = 0

attr = A, NA

damage = 20

guardflag = HA

priority = 3

pausetime = 7,8

sparkno = 0

sparkxy = -10,-58

hitsound = 5,0

guardsound = 6,0

ground.type = High

ground.slidetime = 5

ground.hittime = 8

ground.velocity = -4

air.velocity = -1.3,-3

air.hittime = 14

[state 600, 3]

type = CtrlSet

trigger1 = Time = 17

value = 1

;The control set above is used to give the player a bit of air combo ability.

;Also note that jumping attacks do not have a change state. If it did it may cause the character to start walking in the air. and if your doing a jump attack, your physics should be A for Air. which would mean the player will come down to the ground them selves, and using state 52 (common.cns) which is the jump landing state.

;---------------------------------------------------------------------------

;Jump Strong Punch

; CNS difficulty: easy

[statedef 610]

type = A

movetype= A

physics = A

juggle = 4

poweradd= 30

ctrl = 0

anim = 610

sprpriority = 2

[state 610, 2]

type = PlaySnd

trigger1 = Time = 2

value = 0, 1

[state 610, 3]

type = HitDef

trigger1 = Time = 0

attr = A, NA

damage = 72

guardflag = HA

priority = 4

pausetime = 12,12

sparkno = 1

sparkxy = -10,-55

hitsound = 5,3

guardsound = 6,0

animtype = Med

ground.type = High

ground.slidetime = 12

ground.hittime = 14

ground.velocity = -6

air.velocity = -3,-4

;Oh yeah.. lots of the same here.

;---------------------------------------------------------------------------

;Jump Light Kick

; CNS difficulty: easy

[statedef 630]

type = A

movetype= A

physics = A

juggle = 3

poweradd= 10

ctrl = 0

anim = 630

sprpriority = 2

[state 630, 1]

type = PlaySnd

trigger1 = Time = 1

value = 0, 0

[state 630, 2]

type = HitDef

trigger1 = Time = 0

attr = A, NA

damage = 26

guardflag = HA

priority = 3

pausetime = 8,8

sparkno = 1

sparkxy = -5,-35

hitsound = 5,0

guardsound = 6,0

ground.type = High

ground.slidetime = 6

ground.hittime = 10

ground.velocity = -4

air.velocity = -2,-3

air.hittime = 14

; Nothing new keep moving on...

;---------------------------------------------------------------------------

;Jump Strong Kick

; CNS difficulty: easy

[statedef 640]

type = A

movetype= A

physics = A

juggle = 4

poweradd= 30

ctrl = 0

anim = 640

sprpriority = 2

[state 640, 2]

type = PlaySnd

trigger1 = Time = 2

value = 0, 1

[state 640, 3]

type = HitDef

trigger1 = Time = 0

attr = A, NA

damage = 70

guardflag = HA

priority = 4

pausetime = 12,12

sparkno = 1

sparkxy = -10,-40

hitsound = 5,3

guardsound = 6,0

animtype = Med

ground.type = High

ground.slidetime = 12

ground.hittime = 15

ground.velocity = -7

air.velocity = -3,-4

;And this marks the end of the 4 basic buttons for standing crouching and air attacks.

Link to comment
Share on other sites

  • 6 months later...
  • 3 years later...
  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...