Ok, so I managed to pull this off somehow by putting the enemy in a custom state however there is still a small issue. I hit the player 2 (P2) with a projectile and if he is on the ground it works perfectly. P2 gets in a custom state and losses health however if he jumps and is hit in the air, he flies off screen. Can someone help me with this? This is the code I am using:
[Statedef 850]
type = S
movetype= A
physics = N
juggle = 2
ctrl = 0
anim = 850
poweradd = 0
velset = 0,0
sprpriority = 5
facep2 = 1
[State 0, Projectile]
type = Projectile
trigger1 = animelem = 5
ProjID = 851
projanim = 851
projhitanim = -1
projremanim = -1
projcancelanim = -1
projscale = 1,1
projremove = 1
projremovetime = -1
velocity = 8,0
remvelocity = 0,0
accel = 0,0
velmul = 1
projhits = 1
projpriority = 1
projsprpriority = 3
projedgebound = 0
projstagebound = 0
projheightbound = 0
offset = 0,0
postype = p1 ;p2,front,back,left,right
projshadow = 0,0,0
supermovetime = 0
pausemovetime = 0
attr = S, NA
animtype = Medium
damage = 0
guardflag =
pausetime = 0,0
sparkno = -1
guard.sparkno = s7000
sparkxy = -8,-25
hitsound = S1,5
guardsound = S4,1
ground.type = High
ground.slidetime = 0
ground.hittime = 0
ground.velocity = 0,0
air.velocity = 0,0
Fall = 0
Envshake.time = 15
p2stateno = 1012
[State 0, ChangeState]
type = ChangeState
trigger1 = animtime = 0
value = 0
ctrl = 1
;--------------------------------
;curse
[Statedef 1012]
type = S
movetype= A
physics = N
juggle = 2
anim = 5300
[State 0, ChangeAnim]
type = ChangeAnim
trigger1 = !time
value = 5300
[State -3, Regeneration]
type = LifeAdd
triggerall = Alive = 1
trigger1 = (GameTime%4) = 0
ignorehitpause = 0
value = -10
[State 0, TargetPowerAdd]
type = TargetPowerAdd
trigger1 = 1
value = -1
[State 0, ChangeState]
type = ChangeState
trigger1 = time = 150
value = 0
ctrl = 1



Reply With Quote




Bookmarks