Is it possible for Event 'turn off' lights when player turns them on?

(New to this, not sure where to post this - so feel free to move this if it's in the wrong spot)

I have a monster that hates the light. Any light source, the monster puts it out.

So far I've coded a working flashlight that the player carries that can be turned off and on.
When the flashlight is on and the monster is in the same room - then the monster runs after the player (and if caught, triggers death scene).

Maybe it's too ambitious, but is it possible to code the monster to go toward other points of light that the player sets up (Such as lighting a candle at a certain place, or turning on a light)? So that the player can sneak away while the monster is heading over to that other point of light....
(New to this, not sure where to post this - so feel free to move this if it's in the wrong spot)

I have a monster that hates the light. Any light source, the monster puts it out.

So far I've coded a working flashlight that the player carries that can be turned off and on.
When the flashlight is on and the monster is in the same room - then the monster runs after the player (and if caught, triggers death scene).

Maybe it's too ambitious, but is it possible to code the monster to go toward other points of light that the player sets up (Such as lighting a candle at a certain place, or turning on a light)? So that the player can sneak away while the monster is heading over to that other point of light....

So, I'm no eventing expert, so there might be a better way to go about this, but the first idea that comes to mind for me would be to have the monster have three pages: one for if the flashlight is on (I assume there's a switch involved) and one where it isn't but there are lights on in the room, and one where all lights are off. Assuming you know where the light sources are, you could have the monster follow a custom route across the room towards each light one at a time, and have each of the lights activate on Event Touch. When the light activates, it turns itself off, and the monster would continue down its custom path until all lights are off.

I don't actually know what the monster is supposed to do, if anything, when it turns off all the lights, but without some sort of custom movement plugin, I don't think there is a way to tell an Event to move towards another specific event without some heavy Event work (which could be done, it'd probably just be messy and have a lot of variables).

However, if the position of the lights in the room is static, having it run on a specific route shouldn't cause any issues. I think the trickiest part would be ensuring it returns to its path after being set off course from chasing the player, but this could be fixed simply by having it run offscreen when it's done chasing the player, then teleporting the event back to its path.
short answer, yes, it's possible, maybe even without the need for a plugin.
but it'll require a lot of planning and good handshaking between events, because at some point the monster event will have to be on a state of deciding between multiple points of light to go towards, and there's no processing things in parallel, everything is linear, so you have to assign an order to the whole thing.

the most direct solution I can think of, would be to send the location of the light source to a list that the monster will look to for reference, and then proceed as usual: approach, interact, switch page.
all of that can be done with game variables... the problem is, fine tuning it.
The key question here is something entirely different:

How much do you want the engine to pretend that the monster switched off the light, and how much do you want the player to see how the monster switches off the light?

If you just want to pretend while the monster is off-screen, you write a simple independent event that checks positions and status and then send the player a show text "you hear something running and th click of a switch" before switching off that light.

If you want the player to see how the monster moves there, it'll be much more complext. you'll need a pathfinding plugin if there is more than one or two switches because otherwise the map control will become too complex.
And then you'll need to event a basic AI for the decisions of which target (player or which switch) to move to. And AI-Programming can become very complex very fast.

Original thread: https://forums.rpgmakerweb.com/threads/is-it-possible-for-event-turn-off-lights-when-player-turns-them-on.119393/