Hey guys, I'm having a bit of trouble with giving a character a projectile reflector that is also a melee attack. Now, I got the melee attack to work just fine without any issue, but the issue is the projectile reflector. When the character hits the reflector, it doesn't spawn the opponent's projectile. I'm trying to do it for 4 versions of the move (light, medium, hard, EX).
Here are the codes I'm using:
Helper that spawns the reflector
[State 1330, Helper]
type = Helper
trigger1 = animelem = 6
helpertype = normal
ID = 1302
pos = 0,0
postype = p1
stateno = 1302
helpertype = normal
name = "Reflect"
keyctrl = 0
Reflector's code
[Statedef 1302]
type = S
movetype= A
physics = S
juggle = 4
poweradd= 0
ctrl = 0
anim = 1303
[State 1302, NotHitBy]
type = HitBy
trigger1 = 1
value = SCA,AP
time = -1
[State 1302, HitOverride]
type = HitOverride
trigger1 = !movehit
attr = SCA,NP,SP,HP
slot = 0
stateno = 1305
time = 1
forceair = 0
[State 1302, BindToParent]
type = BindToParent
trigger1 = 1
time = 5
[State 1302, DestroySelf]
type = DestroySelf
trigger1 = time = 33 (this bit is present to disappear when the character goes back to the standing animation)
Reflected projectile
[Statedef 1305]
type = A
movetype= A
physics = N
velset = 0,0
ctrl = 0
[State 1305, VelSet]
type = VelSet
trigger1 = 1
x = -7
[State 1305, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA, AP
time = 1
[State 1305, 0]
type = PosAdd
trigger1 = Time = 0
x = -20
[State 1305, 1]
type = Turn
trigger1 = Time = 0
[State 1305, 3]
type = HitDef
trigger1 = parent,stateno = [1300,1330]
trigger1 = time = 0
attr = A, SP
damage = 15,1
animtype = Medium
guardflag = MA
pausetime = 5,5
sparkno = S8054
sparkxy = 0, 0
hitsound = S1,3
guardsound = S2,0
ground.type = High
ground.slidetime = 20
ground.hittime = 20
ground.velocity = -4,-3
airguard.velocity = -4,-3
air.type = Low
air.velocity = -4,-3
air.juggle = 1
air.fall = 1
affectteam = F
[State 1305, DestroySelf]
type = DestroySelf
trigger1 = frontedgedist < -29
trigger2 = movecontact = 1
What I mainly want with the reflected projectile is to be the exact same one that is used by the owner.
EDIT: Ok, I got it working. I've changed the HitOverride into ReversalDef, and I included the "anim" bit. Oh, and the hitbox for the ReversalDef.