This script allows you to make events that will chase the player or flee from the player when the player enters within range of the event or when the event sees the player.
Insert these lines into the script call window within the Movement Route event to give an event the chase or flee flag. This doesn’t work with players.
@chase_range = x
Event will chase the player after reaching x range.
@flee_range = x
Event will flee from player after reaching x range.
@chase_speed = x
Event will move at x speed when chasing.
@flee_speed = x
Event will move at x speed when fleeing.
@sight_lock = x
Event will chase/flee from player for x frames.
@alert_balloon = x
Event will show ballon ID x when chasing or fleeing.
@see_player = true
For events that require them to see the player first, use this script call inside the movement boxes. This does not follow line of sight rules, which means if there’s a rock blocking you and the event, it will still see you.
— And that’s all, folks! —