News:

MFG's Character of the Month: October 2026 Nominations

Main Menu

Is there a Throwing Attack Tutorial?

Started by MUGENforever, February 22, 2008, 07:14:47 AM

Previous topic - Next topic

MUGENforever

I can't understand much of the stuff in KFM's CNS for the throwing attacks.

Cyanide

KFM's .cns is the best tutorial for throwing. There is none better.


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.

MUGENforever

:( I guess my character is goign to have to go without a grab attack for a very long time...

Bastard Mami

fast run down.
you hit the character; in your hitdef you have a throw atribute and a p2getp1state to 1, after you hit p2 with that he will go to your code to the state you specify in the hitdef. reread kmfm's grab after this info; if you have mroe doubts on it, post your actual doubts.

MUGENforever

this is what I have

Spoiler: CNS (click to show)

;-------------------------------
;Grab Attempt
[Statedef 800]
type    = S
movetype= A
physics = S
juggle  = 0
velset = 0,0
ctrl = 0
anim = 800
sprpriority = 2

[State 800, 1]
type = HitDef
Trigger1 = Time = 0
attr = S, NT
hitflag = M-
priority = 1, Miss
sparkno = -1
p1sprpriority = 1
p1facing = ifelse (command = "holdfwd", 1, -1)
p1facing = 1
p2facing = 1
p1stateno = 801
p2stateno = 802
guard.dist = 0
fall = 1

[State 800, 2]
type = ChangeState
Trigger1 = AnimTime = 0
value = 0
ctrl = 1

;--------------------------------
;Throwing Enemy
[Statedef 801]
type = S
movetype= A
physics = N
anim = 801
poweradd = 60

[State 801, 1]
type = TargetBind
trigger1 = AnimElem = 1
pos = 58, 0
time = 10

[State 801, 2]
type = TargetBind
trigger1 = AnimElem = 2
pos = 58, 0
time = 2

[State 801, 3]
type = TargetBind
trigger1 = AnimElem = 3
pos = 58, 0
time = 2

[State 801, 4]
type = TargetBind
trigger1 = AnimElem = 1
pos = 58, 0
time = 2

[State 801, holdfwd - Turn Target 6]
type = TargetFacing
trigger1 = var(2)
trigger1 = AnimElem = 6
value = -1

[State 810, Hurt 11]
type = TargetLifeAdd
trigger1 = AnimElem = 3
value = -78

[State801, Throw 11]
type = TargetState
trigger1 = AnimElem = 1
value = 802

[State 801, Turn 12]
type = Turn
trigger1 = AnimElem = 2

[State 801, Pos 15]
type = PosAdd
trigger1 = AnimElem = 3
x = -10

[State 801, State End]
type = ChangeAnim
trigger1 = AnimTime = 0
value = 0
ctrl = 1

[State 801, State End]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;--------------------------------
;Enemy Thrown
[Statedef 802]
type    = A
movetype= H
physics = N
velset = 0,0

[State 802, 1]
type = ChangeAnim2
Trigger1 = Time = 0
value = 802

[State 802, 2]
type = SelfState
trigger1 = !gethitvar(isbound)
value = 5050

[State 801, State End]
type = ChangeState
trigger1 = AnimTime = 0
value = 803
ctrl = 1

;--------------------------------
;Enemy Thrown Part 2
[Statedef 803]
type    = A
movetype= H
physics = N
velset = 2.8,-7
poweradd = 40

[State 803, 1]
type = VelAdd
Trigger1 = 1
y = .4

[State 803, 2]
type = ChangeState
triggerall = Vel Y > 0
triggerall = Pos Y >= -20
triggerall = alive
triggerall = CanRecover
trigger1 = Command = "recovery"
value = 5200

[State 803, 3]
type = SelfState
triggerall = Vel Y > 0
triggerall = alive
triggerall = CanRecover
trigger1 = Command = "recovery"
value = 5210

[State 803, 4]
type = SelfState
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5100

[State 801, State End]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

Spoiler: Air (click to show)

;Grab Attempt
[Begin Action 800]
Clsn1: 1
  Clsn1[0] = 4, -108, 30, -47
Clsn2: 1
  Clsn2[0] = -26, -102, 5, -46
41,2, 0,0, 2
Clsn1: 1
  Clsn1[0] = 10, -93, 44, -74
Clsn2: 1
  Clsn2[0] = -29, -104, 11, -39
616,3, 0,0, 5


;Throwing Enemy
[Begin Action 801]
616,2, 0,0, 2
616,3, 0,0, 5
603,0, 0,0, 2
603,1, 0,0, 10
603,2, 0,0, 3
41,2, 0,0, -1


;Thrown
[Begin Action 802]
5030,1, 0,0, 4
5030,2, 0,0, 4
5030,0, 0,0, 4
5030,10, 0,0, 4
5030,40, 0,0, 4
5030,30, 0,0, 4
5030,20, 0,0, 4

Spoiler: CMD (click to show)

;Throw
[State -1, Throw]
type = ChangeState
value = 800
triggerall = command = "Throw"
triggerall = statetype = S
triggerall = ctrl
triggerall = stateno != 100
trigger1 = command = "holdfwd"
trigger1 = p2bodydist X < 3
trigger1 = (p2statetype = S) || (p2statetype = C)
trigger1 = p2movetype != H
trigger2 = command = "holdback"
trigger2 = p2bodydist X < 5
trigger2 = (p2statetype = S) || (p2statetype = C)
trigger2 = p2movetype != H

After my throws the opponent, when the opponent is thrown he falls straight down infront of my character.  My character also freezes after the throw.  He used to loop so I added a -1 at the end of animation, but now he freezes.

Bastard Mami

the target and player states after the throw are relatively complex, do you know what each of these sctrls do ? i suggest to satrt both from 0 and add sctrls as needed; like, only put a statedef and a changestate to 0 when animtime=0 fto them, them put the targetbinds later.