Determine the proximity of the Hero

Does anyone know a script out there (or is able to script), which allows to ask for the proximity of the hero?
I imagine to make events (like animals) bounce, as soon as the hero comes close.

I know there is a script of Ryex (called "Dynamic Effects Engine"), which acts in a similar way by playing sounds as the hero closes on an event.
(But I want to respond to the hero in other ways)

Is there somebody having a clue here?
https://forum.chaos-project.com/index.php/topic,13682.0.html - Demo that contains above script, but I think it's modified

Original thread: https://forums.rpgmakerweb.com/threads/determine-the-proximity-of-the-hero.151962/