How to reference another event inside a script?

Hey RPG Maker community, hope I can get some good help.

I'm working with a plethora of yanfly's plugins, so bear with me. I'm trying to get the Event Chase plugin to play music while the enemy is chasing the player, then play the map's music again when the event is no longer chasing the player.

So I have an event set up that triggers the battle when the event touches the player. This event's Movement is set to Custom Route, where it just stands there and waits for the player to come in range. Its movement is exactly this:

$this._chaseRange = 10

By yanfly's Event Chase plugin, this has the enemy chase the player once in range. This part works just fine.
Then in the plugin description, I have Common Event 008 set up, which simply plays chase music. This also works just fine.

From here, how can I get the event to stop playing the music and turn on the map's music? And how can this easily be applied to all other enemies I make from here on?

I've moved this thread to Plugin Support. Thank you.

calling this should allow you access that event. be careful though.
Code:
$gameMap.event(id)
From here, how can I get the event to stop playing the music and turn on the map's music? And how can this easily be applied to all other enemies I make from here on?

When do you want that to happen? When the event stops chasing? You'd probably need to modify Yanfly's plugin to also allow you to define a CE that will run when an event stops chasing

Original thread: https://forums.rpgmakerweb.com/threads/how-to-reference-another-event-inside-a-script.110114/