Hello,

I need help, this is my first attack that I've animated and coded, I borrowed the code from another grab attack this character has, in hopes of modifying only the animation and position of Player 2 during the grab.

With this code I modified, when I try to use it, the animation plays, but Player 2 does not change into any damage animation and is not binded at all, and when the grab animation finishes, Player 1 just kicks for some reason (which is weird because this grab is coded to Light Punch button), and only that End kick deals damage, but I don't even want that kick to happen. Below is the code, can someone help?

[Statedef 560]
type = S
movetype = I
physics = S
juggle = 0
velset = 0,0
ctrl = 0
anim = 560
sprpriority = 2

[State 560]
type = statetypeset
trigger1 = animelem = 2
movetype = A

[State 560]
type = HitDef
triggerall = P2stateno!=40
triggerall = P2stateno!=[120,153]
triggerall = enemy,movetype != H
Trigger1 = animelem = 2,>= 0
attr = S,NT
hitflag = M-
priority = 1,Miss
sparkno = -1
sprpriority = 1
p1facing = 1
p2facing = 1
p1stateno = 561
p2stateno = 900

[State 560]
type = ChangeState
Trigger1 = animtime = 0
value = 245

;---------------------------------------------------------------------------
;ネックハング
[Statedef 561]
type = S
movetype = A
physics = S
juggle = 0
velset = 0,0
ctrl = 0
anim = 560
sprpriority = 2

[State 561]
type = posset
trigger1 = time = 0
y = 0

[State 561]
type = TargetState
trigger1 = animelem = 1
trigger1 = prevstateno = 560
value = 900

[State 561]
type = TargetState
trigger1 = animelem = 1
trigger1 = prevstateno = 561
value = 901

[State 561]
type = changeanim
trigger1 = animelem = 1
trigger1 = prevstateno = 561
value = 560
elem = 2

[State 561]
type = TargetBind
trigger1 = animelem = 1,>= 0
pos = 0,0

[State 561]
type = targetlifeadd
trigger1 = Animelem = 3
value = -33

[State 561]
type = Explod
trigger1 = Animelem = 3
anim = 2200
id = 2200
pos = 55,-148
postype = p1
sprpriority = 3
ownpal = 1
;removeongethit = 1

[State 561]
type = varset
trigger1 = time = 0
trigger1 = prevstateno = 560
var(3) = 5

[State 561]
type = varadd
trigger1 = animelem = 3
var(3) = -1

[State 561]
type = changestate
trigger1 = animtime = 0
trigger1 = enemynear,alive = 0
value = 562

[State 561]
type = changestate
trigger1 = animtime = 0
value = ifelse(var(3)<=0,562,561)

;---------------------------------------------------------------------------
;ネックハング
[Statedef 562]
type = S
movetype = A
physics = S
juggle = 0
velset = 0,0
ctrl = 0
anim = 562
sprpriority = 2

[State 562]
type = posadd
trigger1 = time = 0
trigger1 = frontedgebodydist < 60
x = -40

[State 562]
type = TargetState
trigger1 = animelem = 1
value = 905

[State 562]
type = varset
trigger1 = time = 0
var(3) = 0

[State 562]
type = changestate
trigger1 = animtime = 0
value = 0
ctrl = 1

;---------------------------------------------------------------
[Statedef 900]
type = A
movetype = H
physics = N
velset = 0,0
poweradd = 80
sprpriority = 1

[State 900]
type = ChangeAnim2
Trigger1 = Time = 0
value = 900

[State 900]
type = null;changestate
trigger1 = time < 4
trigger1 = command = "x" || command ="y" || command ="z"
trigger1 = command ="holdfwd"||command="holdback"
value = 562

- - - Updated - - -

Update: I figured out one part of the issue, it was due to me cobbling together code and different animations I think. IN the first "Statedef" the "anim=" was set to 560, when it needed to be 800, which I think was due to me modifying animations. New issue has come up however

I am running into the issue of, now that the grab is working and damaging properly, Player 2 is now getting stuck in damage animations in mid-air and it effectively brings gameplay to a halt because player 2 cannot attack and is invincible.