News:

MFG's Character of the Month: October 2026 Nominations

Main Menu

Adding an Attack to a character?

Started by superbsaiyan, December 09, 2012, 01:58:54 PM

Previous topic - Next topic

superbsaiyan

I am using Fighter Factory to try to add an attack to a Ryu character I downloaded a while ago. I am just reusing animations already in the sff. I put in the states, and the commands and whatnot, but when I run mugen nothing happens when I use the command (D, DF, F, x) I put in the cmd file. Other than that the character works just fine, like the regular Ryu, so could somebody tell me why this added attack is not working.
Added to the Cns:
;--------------------------------------------
;Added Attack
[Statedef 6000]
type    = S
movetype= A
physics = S
juggle  = 5
poweradd= 85
ctrl = 0
velset = 0,0
anim = 1000
sprpriority = 2

[State 6000, 1] ;Back Dust
type = Explod
trigger1 = AnimElem = 3
persistent = 0
anim = 8020
postype = p1
pos = 10, 3
velocity = 0, 0
accel = 0, 0
removetime = -2
sprpriority = 4

[State 6000, 2] ;Hadou-Ken Dust
type = Explod
trigger1 = AnimElem = 5
persistent = 0
anim = 8021
postype = p1
pos = 0, 9
velocity = 0, 0
accel = 0, 0
removetime = -2
sprpriority = 6
ownpal = 0

;[State 1000, 3] ;Projectile Dust
;type = Helper
;trigger1 = AnimElem = 5
;helpertype = normal
;name = "Projectile Dust"
;ID = 8020
;postype = p1
;pos = 54, 5
;stateno = 8020
;sprpriority = 4
;ownpal = 1
;persistent = 0

[State 6000, 4]
type = Helper
trigger1 = AnimElem = 5
helpertype = normal
name = "Hadou-Ken"
ID = 6005
pos = 60, -66
postype = p1
;bindtime = -1
;facing = 1
stateno = 6005
ownpal = 1

[state 6000, 5]
type = PalFX
trigger1 = time = [3, 5];[8,11]
add = 40,60,60
time = 1

[state 6000, 6]
type = PalFX
trigger1 = time = [6, 7];[12,14]
add = 80,120,120
time = 1

[state 6000, 7]
type = PalFX
trigger1 = time = [8, 9];[15,17]
add = 120,180,180
time = 1

[state 6000, 8]
type = PalFX
trigger1 = time = [10, 11];[18,20]
add = 160,240,240
time = 1

[state 6000, 9]
type = PalFX
trigger1 = time = 12;21
add = 120,180,180
time = 1

[state 6000, 10]
type = PalFX
trigger1 = time = 13;22
add = 40,60,60
time = 1

[State 6000, 11]
type = Width
trigger1 = Time = [12, 37]
player = 20, 5

[State 6000, 12]
type = PlaySnd
trigger1 = AnimElem = 4
value = 2, 0
channel = 0

[State 6000, 13]
type = PlaySnd
trigger1 = AnimElem = 4
value = 18, 0

[State 6000, 14]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

;-----------------------------------------------
;Added helper

[Statedef 6005]
type    = A
movetype= A
anim = 1005
sprpriority = 3

[State 6005, 0] ;Projectile Dust
type = Helper
triggerall = parent, Pos Y = 0
trigger1 = Time = 0 ;AnimElem = 5
helpertype = normal
name = "Projectile Dust"
ID = 8020
postype = p1
pos = 6, 71 ;(54, 5) + (-60, 66)
stateno = 8020
sprpriority = 4
ownpal = 1
persistent = 0

[state 6005, 1]
type = VelSet
trigger1 = Time = 0
x = 4

[State 6005, 2]
type = HitDef
trigger1 = Time = 0 && P2BodyDist X > 80
attr = A, SP
damage = floor(100 + (root,var(41))/(1+(root,Var(19)/5.0))), 6
animtype = Heavy
guardflag = MA
hitflag = MAF
priority = 4 + var(43), Hit
sprpriority = 3
pausetime = 3, 3
guard.sparkno = S8200
sparkno = S8270
sparkxy = 0, 0
hitsound = S15, 2
guardsound = S16, 0
ground.type = High
ground.slidetime = 15
ground.hittime  = 25
ground.velocity = -5
airguard.velocity = -1
air.type = High
air.velocity = -4, -2
air.hittime = 25
palfx.time = 31
palfx.add = 160,240,140
palfx.mul = 80,120,220
palfx.sinadd = 80, 80, 80, 5

[State 6005, 3]
type = HitDef
trigger1 = Time = 0 && P2BodyDist X <= 80
attr = A, SP
damage = floor(105 + (root,var(41))/(1+(root,Var(19)/5.0))), 7
animtype = Heavy
guardflag = MA
hitflag = MAF
priority = 4 + var(43), Hit
sprpriority = 3
pausetime = 3, 3
guard.sparkno = S8200
sparkno = S8270
sparkxy = 0, 0
hitsound = S15, 2
guardsound = S16, 0
ground.type = High
ground.slidetime = 20
ground.hittime  = 25
ground.velocity = -10, -5
airguard.velocity = -5
air.type = High
air.velocity = -9, -4
air.hittime = 25
fall = 1
air.fall = 1
palfx.time = 31
palfx.add = 160,240,140
palfx.mul = 80,120,220
palfx.sinadd = 80, 80, 80, 5

[State 6005, 4]
type = ParentVarSet
trigger1 = NumTarget > 0
trigger1 = !target, IsHelper
trigger1 = parent, P2BodyDist X > 140;80
trigger1 = MoveHit
v = 20
value = 1
ignorehitpause = 1

[State 6005, 5]
type = ParentVarSet
trigger1 = NumTarget > 0
trigger1 = !target, IsHelper
trigger1 = parent, P2BodyDist X <= 140;80
trigger1 = MoveHit
v = 20
value = 2
ignorehitpause = 1

[State 6005, 6]
type = HitBy
trigger1 = 1
value = SCA, NP,SP,HP

[State 6005, 7]
type = HitOverride
trigger1 = 1
attr = SCA, AA,AT,AP,NA,NP,SP,HP,NT,HT
stateno = 1008
time = -1

[State 6005, 8]
type = ChangeState
trigger1 = MoveContact || BackEdgeDist < -45 || FrontEdgeDist < -45 ;Thanks Ixnaydk
;trigger2 = Vel X = 0 && Time = 10
value = 1008


I pretty much just coppied the Haduken code and changed a few values, this I added to the cmd file:
The Command

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


The State -1 part:
;Added Hadoken
[State -1, Added]
type=ChangeState
value = 6000
triggerall = command = "Added"
trigger1=statetype=S
trigger1=ctrl


So why does nothing happen when I press down, down-forward, forward, x in game as this character. Is there some sort of extra compiling I have to do before saving it? Did I reuse an already in use command?(I don't think so)  Did I mess something up in the states or commands themselves?

Cobra Caddie

Think it's gonna be one of 2 things.

1. Make sure you have an anim 1000 in your air file. If this is the problem, if you hold ctrl and press d in game, it should show a bunch of white text and when you try to do the move, it'll say "invalid animation 1000 in state 6000" or something like that.

2. In the cmd file, make sure that

    ;Added Hadoken
    [State -1, Added]
    type=ChangeState
    value = 6000
    triggerall = command = "Added"
    trigger1=statetype=S
    trigger1=ctrl

is above the normal attacks. Like your weak punch move which usually is just an x. Make sure the hadoken is higher up in the cmd file. Mugen gives priority to whichever comes first from top to bottom, so if your normal is above your special move, it's going to do the normal instead.

Those are the only two I can see right now, too groggy. :P

superbsaiyan

I think there might be something wrong with the window size or somethng, because i can't see all of the text that comes up on ctrl+d, but when I do that, i don't see anything about an invalid animation, as it is the same animation used for the already existing Hadoken. I also moved that part in the cmd, nothing changed.

Cobra Caddie

I don't know if I can help you with the debug text other than suggesting putting your Mugen screen at a standard window size, if it's not already set to one. Here's a few more things you can check:

- Check to see if you already have a state 6000
- Make sure you still put the command in statedef -1 when you moved it up
- This one probably isn't it, but make sure you're actually editing the right cmd file. Some characters have multiple cmd files. Also make sure you're saving it properly(I know this seems like a no brainer but I've personally done a bunch of no brainer stuff)

I usually edit stuff in notepad and not fighter factory so it could be an error with that. Someone who uses that program more might be able to point something out.