#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)

karmic flame
#
  • how do I make it where an enemy is chasing you and when your far away then they stop chasing you and go back to their movement like what code do I do for that... I want this question to be answeredsadjulian sadjulian
gritty plume
gritty plume
karmic flame
gritty plume
# karmic flame

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]