MV Need advice on enemy spawning mechanic

What I am trying to do is create an event that spawns an enemy that gives chase when the player is close enough. Basically, the monster is invisible until the player gets close enough then when the monster detects the player (Yanfly Event Chase plugin) it turns visible and gives chase.

If the player wins or escapes the event flips over to a cool down page (using Shaz_MultiTimers) and at the end of the timer the encounter event resets to its original position (and turns invisible again).

Here is what I have set up so far and it would work but... apparently there is a small oversight/issue with Yanflys Event Chase plugin. If the player is already within the monsters "detection range" when the event spawns/respawns then it will not run the "this._alertCommonEvent = x" script in the movement route.

I use this script to toggle the switch that turns the encounter visible. So if the player is within the monsters detection range when the event respawns it gives chase but stays invisible.

Here is the event so far:

What I would like to get advice on is whether there may be an easier way to accomplish what I am trying to do. Am I over complicating this? I kinda need to figure out another way, rather than use the common event to flip a "player seen" switch because that would make all monsters on the map turn visible when the first monster sees them...

I am sure this has been done before, any advice would be greatly appreciated. Thanks.

Edit: Ok, I moved the CommonEvent command script up to the top of the movement route and that seems to fix the issue with the monster not running the common event but I am still left with all monsters on a map becoming visible when the CE runs and flips the switch.

Question - Can I flip a self switch using a script thats placed in the movement route, in place of the common event script? I think that would solve my problem.

Edit: Derp, I found the switch on and off in the movement route and tried using it with Yanflys Self Sw plugin but it automatically turns on the switch making the monsters visible. So that doesn't seem to work.
You don't need plugins for any of this. All you need is a parallel event on each map with encounters that tracks both player x, y and all encounters x, y. Then if the player x, y comes in range of the enemy x, y activate that encounter's chase mechanic until player leaves its radius or engages in combat.
That same parallel event can handle cooldown timers too, with variables for each encounter on the map.

Then you can copy paste the event to other maps with encounters and just edit the events that are set as encounters in it.

But someone familiar with those plugins might be able to give a better, more direct answer.
Moved to: Plugin Support
It's not necessarily plugin support, I am just trying to get an example of how I might set up an enemy spawn system.

Original thread: https://forums.rpgmakerweb.com/threads/need-advice-on-enemy-spawning-mechanic.132467/