So I just started to code an attack, I started with a stand light punch, here's the state[mcode][Statedef 200]type = S ;State-type: S-stand, C-crouch, A-air, L-liedownmovetype= A ;Move-type: A-attack, I-idle, H-gethitphysics = S ;Physics: S-stand, C-crouch, A-airjuggle = 1 ;Number of air juggle points move takes;Commonly-used controllers:velset = 0,0 ;Set velocity (x,y) (Def: no change)ctrl = 0 ;Set ctrl (Def: no change)anim = 200 ;Change animation (Def: no change)poweradd = 20 ;Power to add (Def: 0)sprpriority = 2 ;Set p1's sprite layering priority to 2 (in front)[State 200, 1]type = HitDeftrigger1 = AnimElem = 3attr = S, NA ;Attribute: Standing, Normal Attackdamage = 23, 0 ;Damage that move inflicts, guard damageanimtype = Light ;Animation type: Light, Medium, Heavy, Back (def: Light)guardflag = MA ;Flags on how move is to be guarded againsthitflag = MAF ;Flags of conditions that move can hitpriority = 3, Hit ;Attack priority: 0 (least) to 7 (most), 4 default;Hit/Miss/Dodge type (Def: Hit)pausetime = 8, 8 ;Time attacker pauses, time opponent shakessparkno = 0 ;Spark anim no (Def: set above)sparkxy = -10, -76 ;X-offset for the "hit spark" rel. to p2,;Y-offset for the spark rel. to p1hitsound = 5, 0 ;Sound to play on hitguardsound = 6, 0 ;Sound to play on guardground.type = High ;Type: High, Low, Trip (def: Normal)ground.slidetime = 5 ;Time that the opponent slides background.hittime = 10 ;Time opponent is in hit stateground.velocity = -4 ;Velocity at which opponent is pushedairguard.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 pushedair.hittime = 12 ;Time before opponent regains control in air[State 200, 1]type = PlaySndtrigger1 = Time = 1value = 0, 0[State 200, 7]type = ChangeStatetrigger1 = AnimTime = 0value = 0ctrl = 1[/mcode]And this is my cmd code [mcode][state -1]type = ChangeStatetriggerall = command = "a"triggerall = command! = "holddown"trigger1 = ctrl = 1trigger1 = statetype = svalue = 200[/mcode]during the test when I inputed the command the charactor didn't punch, what did I do wrong? thank you ???
Did you by any chance do his AIR file yet? He wont punch or perform animation number 200 if it doesnt exist
Oh...never mind I erased the command!=holddown line in the cmd and it works, but I don't really understand why....
S0RA said, June 19, 2009, 06:08:22 amChange the ctrl 0 at the top to 1 that should solve your problem For the record. This suggestion is utterly wrong. Ctrl in an attacking state should almost always be 0, you shouldn't have ctrl unless there's a really specific reason for it, and there aren't many of those.juggernaut117 said, June 19, 2009, 06:27:53 amOh...never mind I erased the command!=holddown line in the cmd and it works, but I don't really understand why.... That, is interesting. Unless mugen wasn't reading it correctly the way you had it spaced. Doestriggerall = command != "holddown" Function?
Cyanide said, June 19, 2009, 08:17:32 amS0RA said, June 19, 2009, 06:08:22 amChange the ctrl 0 at the top to 1 that should solve your problem For the record. This suggestion is utterly wrong. Ctrl in an attacking state should almost always be 0, you shouldn't have ctrl unless there's a really specific reason for it, and there aren't many of those.juggernaut117 said, June 19, 2009, 06:27:53 amOh...never mind I erased the command!=holddown line in the cmd and it works, but I don't really understand why.... That, is interesting. Unless mugen wasn't reading it correctly the way you had it spaced. Doestriggerall = command != "holddown" Function?Sorry I'm still learning any tips on how to make a combo system btw?
Cyanide said, June 19, 2009, 08:17:32 amThat, is interesting. Unless mugen wasn't reading it correctly the way you had it spaced. Doestriggerall = command != "holddown" Function?You mean the code? When I hold down the "a" button, the charactor only punched once, so if the trigger means "not holddown", then yes, it does work ???
holddown means hold the "down" direction key, not hold down the A button. And this trigger should be there.
Oh~~I got it, I had a space between the ! and =, that's why it didn't function, I added this line back now triggerall = command!= "holddown"The charactor is punching normally now, but I'm not sure how to see whether the trigger works or not...
QuoteThat, is interesting. Unless mugen wasn't reading it correctly the way you had it spaced. Doestriggerall = command != "holddown"Function?Goddammit. I POSTED that.