#how do I make the enemy chase me but when I'm far away it stops chasing me
1 messages · Page 1 of 1 (latest)
infinite loop
keep wait until self with main actor distance < (distance or 10)
execute command start chasing
keep wait until self with main actor distance > (distance again)
execute command stop chasing
It ain't work
show scriprt
anything below an infinite loop won't run so replace whatever mock up you did there with my code, also if you want the actor to have patrol movement when the actor is too far just do
execute command start moving
keep loop until self with main actor distance < (distance)
if wall collision or reach end
motion direction = (random or opposite)
[add execute command stop moving in the keep wait actor distance > (dist) part above the start chasing and of course the stop chasing is above the start moving]