Hi ink! I wanted to avoid the use of two almost identical helpers...direction and hitdef can be decided in the same statedef.
By the way, I finally found a way to make it work properly:
; Energy bolt (helper)
[Statedef 1161]
type = A
movetype = A
physics = N
juggle = 2
velset = 0,0
ctrl = 0
anim = 10091
sprpriority = 2
[State 1161]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1
[State 1161]
type = PosAdd
trigger1 = root,anim = 1090
trigger1 = time = 0
x = -10
[State 1161]
type = Turn
trigger1 = prevstateno = 1092
trigger1 = time = 0
trigger2 = root,anim = 1090
trigger2 = time = 0
[State 1161]
type = VelSet
trigger1 = prevstateno != 1092
trigger1 = time > 0
x = 3
[State 1161]
type = VelSet
trigger1 = prevstateno = 1092
trigger1 = time > 0
trigger2 = root,anim = 1090
trigger2 = time > 0
x = 3
[State 1161]
type = HitDef
triggerall = prevstateno != 1092
trigger1 = time = 0
attr = S, SP
animtype = Light
damage = 90, 9
guardflag = MA
pausetime = 0,2
sparkno = s10092
guard.sparkno = s10092
hitsound = s8, 92
guardsound = s8, 92
ground.type = High
ground.slidetime = 12
ground.hittime = 12
ground.velocity = -4,0
air.velocity = -3,-3
airguard.velocity = -2,-2
palfx.time = 24
palfx.mul = 256,256,256
palfx.add = 40,-70,-200
palfx.sinadd = 40,30,0,10
palfx.invertall = 1
palfx.color = 0
[State 1161]
type = HitDef
triggerall = prevstateno = 1092
trigger1 = time = 0
affectteam = F
attr = S, SP
animtype = Light
damage = 90, 9
guardflag = MA
pausetime = 0,2
sparkno = s10092
guard.sparkno = s10092
hitsound = s8, 92
guardsound = s8, 92
ground.type = High
ground.slidetime = 12
ground.hittime = 12
ground.velocity = -4,0
air.velocity = -3,-3
airguard.velocity = -2,-2
palfx.time = 24
palfx.mul = 256,256,256
palfx.add = 40,-70,-200
palfx.sinadd = 40,30,0,10
palfx.invertall = 1
palfx.color = 0
[State 1161]
type = ChangeState
triggerall = prevstateno = 1092
trigger1 = root,anim = 1090 && movecontact
value = 1161
[State 1161]
type = DestroySelf
trigger1 = frontedgedist < -100
trigger2 = movecontact
There's only a bug left: when the helper collides with the original owner (just him, not the enemy) in reversal state, it activates sparkno (there's no hit or damage, just collision). I think I could fix it by coding the sparkno as external explods...what a mess! - -' Any suggestions?