Need help with stealth(ish) scene.

Basically what i'm trying to do is have events approach you while your lighter is off and run away from you while you have your lighter activated. I'm using Yanfly's Event chase player 2.0 plugin to move the event around. Here's what i've tried to do but it's not working the way I'd hoped: Screenshot (4).png I created a variable called "Illumination" for when your lighter is active.

Screenshot (2).png I created a patrolling event here and used Yanfly's plugin to try to have it call a common event before actually chasing you.

Screenshot (3).png The common event in question is right here. It basically checks to see if the variable'Illumination' is set to 1. If it is then the event flees.


Instead it's ignoring the common event entirely ,and im going crazy trying to figure out why.

Thanks in advance! 😀
I'm using this plugin as well. Are you sure you can us the flee commands as script commands outside of the events movement box? I thought they were limited/bound to that area and couldn't be used as regular commands. One thought would be to have two pages of same event and it toggles between the "chase" and "flee" pages based on that illumination switch. On each page set up a different chase parameter in the movement route?
I don't think yanfly's event chase works in common event, though I could be wrong.

I'd set this up inside the enemy/NPC himself.
2 pages in the character, one of condition illumination is 0, one page on condition illumination is 1.

Page One - If variable = 0
Open the auto move route - Open a script command and enter (this._chaseRange = x) x being the distance the npc can see.
Lets say the player dies when NPC catches him in the dark. Set event trigger to "event touch" and fill out what happens.
Capture2.PNG
Event Page above
Capture1.PNG
Page One MoveRoute above

Page Two - If variable = 1
Open the auto move route - Open a script command and enter (this._fleeRange = x) x being the distance the npc can see.
If the player has the lighter equipped and does something to the NPC on catching him, set event trigger on this page to "player touch".
Capture4.PNG
Event Page above
Capture3.PNG
MoveRoute Above
Works like a charm! Thanks again friend! 😀

Original thread: https://forums.rpgmakerweb.com/threads/need-help-with-stealth-ish-scene.94456/