Monster AI chasing

So is there a way I can make a monster that walks randomly around the map but when you get closer to it
start’s chasing you?
Make it a parallel process on page 1 which checks the distance from the player (you can use Pythagoras' rule). If it's below the desired threshold, enable a switch that is the start condition for page 2. On page 2 you set it to chase the player and make it start the fight on player contact.

Note that you'll have to use a new switch when you create a second monster like this, at least on the same map. Don't forget to reset the switches when you enter a new map then.
Make it a parallel process on page 1 which checks the distance from the player (you can use Pythagoras' rule). If it's below the desired threshold, enable a switch that is the start condition for page 2. On page 2 you set it to chase the player and make it start the fight on player contact.

Note that you'll have to use a new switch when you create a second monster like this, at least on the same map. Don't forget to reset the switches when you enter a new map the
For my game I am just planning to do scripted chases but thanks so much I thought this forum was death hopefully not
Hm, I'm not sure what you mean then. If the chase should be scripted, that would mean that the player position/movement as well as the enemy position/movement would have to be known in advance, however if the player can approach the enemy from any angle and also the enemy should randomly move at the beginning, that means the chase route cannot be known in advance...

Original thread: https://forums.rpgmakerweb.com/threads/monster-ai-chasing.165640/