hi again!
my homing projectile is doing well, except i've tumbled with another problem. I want the helper to disappear after 4 hits or after being blocked 4 times. for that, i've made the following hitdef:
[State 1042, Hit]
type = hitdef
trigger1 = time%60
priority = 4, hit
attr = S, SP
damage = 20 * ifelse(vel x < 0,(-vel X),(vel x))
animtype = Hard
hitflag = MAFD
guardflag = MA
pausetime = 1,1
sparkno = S10001 + (random%4)
sparkxy = -10, 0
hitsound = S2, ifelse(random < 500, 5, 2)
guardsound = S3, ifelse(random < 500, 0, 1)
ground.type = high
ground.slidetime = 16
ground.hittime = 16
ground.velocity = ifelse(p2dist x > 0,-30,30), 0
ground.cornerpush.veloff = 0
air.velocity = 0, -15
air.fall = 1
fall.recovertime = 30
givepower = 36, 36
envshake.time = 14
envshake.freq = 120
envshake.ampl = 4
yaccel = .5
airguard.ctrltime = 16
airguard.velocity = -8, -1.5
forcestand = 1
and then, it was supposed to change state (to vanish) if meeting these conditions:
[State 1042, End]
type = changestate
trigger1 = hitcount > 3 ;------------------> works
trigger2 = moveguarded >= 3 ;----------> do not work
trigger3 = pos y > 0
value = 1042
ignorehitpause = 1
[State 1042, End]
type = destroyself
trigger1 = hitcount > 3 ;------------------> works
trigger2 = moveguarded >= 3 ;----------> do not work
what should I do to replace trigger2 and then get it blocked 4 times before vanishing? because if I change it to moveguarded, then it vanishes on first hit and that's not what I want...