YesNoOk
avatar

Close attack doesn't work (Read 901 times)

Started by NikoPalad67140, August 17, 2022, 12:54:40 pm
Share this topic:
Close attack doesn't work
#1  August 17, 2022, 12:54:40 pm
  • avatar
  • *
    • France
Hey guys!
I have a problem with on of my attacks. I want to create a close light punch, and here's the code in the .cmd and .cns files:

CMD
Code:
;---------------------------------------------------------------------------
;Close Light Punch
[State -1, Close Light Punch]
type = ChangeState
value = 300
triggerall = command = "x"
triggerall = command != "holddown"
triggerall = statetype = S
triggerall = stateno != 100
trigger1 = p2bodydist X <= 30

CNS
Code:
;---------------------------------------------------------------------------
; Close Light Punch
; CNS difficulty: easy
[Statedef 300]
type    = S
movetype= A
physics = S
juggle  = 1
velset = 0,0
ctrl = 0
anim = 300
poweradd = 10
sprpriority = 2

[State 300, 1]
type = HitDef
trigger1 = AnimElem = 1
attr = S, NA
damage = 23, 0
animtype = Light
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 8, 8
sparkno = 0
sparkxy = -10, -76
hitsound = 5, 0
guardsound = 6, 0
ground.type = High
ground.slidetime = 5
ground.hittime  = 11
ground.velocity = -4
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -1.4,-3
air.hittime = 15

[State 300, 2]
type = PlaySnd
trigger1 = Time = 1
value = 0, 0

[State 300, 3]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

However, when I playtest the character, the close attack doesn't show up, despite the animation being tagged as 300 in the AIR file. Can someone help me?
Re: Close attack doesn't work
#2  August 17, 2022, 01:16:08 pm
  • **
CMD
Code:
;---------------------------------------------------------------------------
;Close Light Punch
[State -1, Close Light Punch]
type = ChangeState
value = 300
triggerall = command = "x"
triggerall = command != "holddown"
triggerall = statetype = S
triggerall = stateno != 100
trigger1 = p2bodydist X <= 30
you should have a triggerall = ctrl in there as well.

Since this move is set to not work for more than 30 pixels from p2, you mean to say it's not coming out even when you're standing right next to p2?

Re: Close attack doesn't work
#3  August 17, 2022, 02:05:10 pm
  • *****
  • Shame on you!
    • USA
An easy way to test if your new move isn't working because of a cmd problem is to change standing light punch to that stateno.
I'd change 200 to 300 and then the 300 to 200. See if the swap produces the same results.

If you think it's because of the animation not playing properly, switch that value after the changestate swaps.
If anim 300 isn't showing up. Use fighter factory to search for 300 in the anims. You may have a blank animation.

Use Debug, Ctrl+D, to see if it's switching to state 300 and a bunch of other stuff.
You may want to increase the 30, to say 160, and see if the move comes out then. If that works. Keep adjusting the value smaller until you get the proper distance you want.
vVv Ryuko718 Updated 10/31/22 vVv
Re: Close attack doesn't work
#4  August 17, 2022, 02:29:16 pm
  • **
  • I dress like your Great Great Grandfather.
Edit: I read the changestate info wrong.

Is the animation firing but no connection happening? You may need to check your CLSNs.