Amended my previous post, but my current code is here:
[Statedef 510]
type = S
movetype= A
physics = S
ctrl = 0
anim = 1000
[State 0]
type = VarSet
trigger1 = time = 0
v = 5
value = 0
[State 0]
type = Helper
trigger1 = animelem = 5
helpertype = normal
name = "H1"
ID = 513
stateno = 513
pos = 20,-50
postype = p1 ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermove
pausemove
[State 0]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1
[Statedef 511]
type = S
movetype= A
physics = S
ctrl = 0
anim = 1000
[State 0]
type = Helper
trigger1 = animelem = 5
helpertype = normal
name = "H2"
ID = 514
stateno = 514
pos = 20,-50
postype = p1 ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermove
pausemove
[State 0]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1
[Statedef 512]
type = S
movetype= A
physics = S
ctrl = 0
anim = 1000
[State 0]
type = Helper
trigger1 = animelem = 5
helpertype = normal
name = "H3"
ID = 515
stateno = 515
pos = 20,-50
postype = p1 ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 0
supermove
pausemove
[State 0]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1
[Statedef 513]
type = A
movetype = A
physics = N
ctrl = 0
anim = 510
sprpriority = 5
velset = 5,0
[State 0]
type = HitDef
trigger1 = time = 0
attr = A,SP
damage = 10,5
animtype = Hard
guardflag = A
hitflag = MAF
priority = 4, Hit
pausetime = 2,2
sparkno = s8253+random%2
hitsound = s8250,0
sparkxy = 0,0
guardsound = 6,0
ground.type = High
ground.slidetime = 12
ground.hittime = 12
ground.velocity = 1,-5
air.type = Low
air.hittime = 5
air.velocity = 1,-6
fall=1
fall.recover=0
[State 513,3]
type = Velset
trigger1 = FrontEdgeDist <1
x = -5
y = 0
[State 513]
type = ParentVarAdd
trigger1 = abs(RootDist X) <= 1
v = 5
value = 1
[State 513]
type = DestroySelf
trigger1 = (MoveContact)
trigger2 = time > 10
trigger2 = abs (RootDist X) <= 1
[Statedef 514]
type = A
movetype = A
physics = N
ctrl = 0
anim = 510
sprpriority = 5
velset = 5,0
[State 0]
type = HitDef
trigger1 = time = 0
attr = A,SP
damage = 10,5
animtype = Hard
guardflag = A
hitflag = MAF
priority = 4, Hit
pausetime = 2,2
sparkno = s8253+random%2
hitsound = s8250,0
sparkxy = 0,0
guardsound = 6,0
ground.type = High
ground.slidetime = 12
ground.hittime = 12
ground.velocity = 1,-5
air.type = Low
air.hittime = 5
air.velocity = 1,-6
fall=1
fall.recover=0
[State 513,3]
type = Velset
trigger1 = FrontEdgeDist <1
x = -5
y = 0
[State 513]
type = ParentVarAdd
trigger1 = abs(RootDist X)<= 1
v = 5
value = 1
[State 513]
type = DestroySelf
trigger1 = (MoveContact)
trigger2 = time > 10
trigger2 = abs(RootDist X) <= 1
[Statedef 515]
type = A
movetype = A
physics = N
ctrl = 0
anim = 510
sprpriority = 5
velset = 7,0
[State 0]
type = HitDef
trigger1 = time = 0
attr = A,SP
damage = 10,5
animtype = Hard
guardflag = A
hitflag = MAF
priority = 4, Hit
pausetime = 2,2
sparkno = s8253+random%2
hitsound = s8250,0
sparkxy = 0,0
guardsound = 6,0
ground.type = High
ground.slidetime = 12
ground.hittime = 12
ground.velocity = 1,-5
air.type = Low
air.hittime = 5
air.velocity = 1,-6
fall=1
fall.recover=0
[State 0]
type = ParentVarAdd
trigger1 = time = 0
v = 5
value = -2
[State 513]
type = DestroySelf
trigger1 = (MoveContact)
trigger1 = time = 50