How to make a simple candle turn on and off?

This is real basic event stuff, I'm sure, but I just can't remember how to set it up.

I've got candle events that I want the player to be able to walk up and turn on and off.

I can't use a switch because it'll turn off all the other candles.

Is there a way to do this with only two pages?

EDIT: I realized you can just turn on and off a self switch. That's easy enough, but what about if I want all the lights to turn on. Is there a way to do that? Let's say its day time and the player goes to sleep in a bed. I'd like them to then wake up with all the candles set to on.
You can easily control multiple events on a map using "OuterSelfSwitch" a plugin that comes packaged with MV. There are other plugins that do the same ( I even have one around here myself...)

F.EX.: OuterSelfSwitch on 9 A

What you'll really want to do is make the decision of what your priority of on-vs-off is. You could use multiple switches and a self switch too. I would probably stick to self-switches, and use whatever is set to make the game-time go from day to night activate the different candles in the room. Then, if the player activates the candle it will turn it off or on.
You dont need a plugin. Start with the Self Switches. Then, if you want to make a global condition which overrides the state of the candle, lets say day, then make a new event tab with a global switch as condition. The event tab with highest priority(3) is shown, regardless of what the Self Switch on tab(2) is
That's what I'd do -
page 1, no conditions, candle is off, event commands turn on self switch A
page 2, conditioned by self switch A, candle is on, event commands turn off self switch A
page 3, conditioned by a global switch, candle is on, no event commands (assuming you want to force the candles to all be on at night time)

Then when it becomes day time again (global switch is off), the candles will revert to on/off - whatever they were the last time the player actively changed them.
The simplest way without using a script/script comands would be to create page 3 for every candle with switch "all candles" on.
I would slightly change @Shaz example to still being able to turn candles on or off at nighttime:
Its not the cleanest way but it works.

page 1, no conditions, candle is off, event commands turn on self switch A
page 2, conditioned by self switch A, candle is on, event commands turn off self switch A
page 3, conditioned by a global switch1, no Eventgraphic or candle off, event on parallel, event commmands:
Conditional Branch global switch2 is OFF (This Switch determines if all candles go out or on)
yes: Turn Self Switch A off, Wait 8 Frames (The Wait is to stop this Eventpage from repeating, before the Page condition will be turned off again in another Event)
else: Turn Self Switch A on, Wait 8 Frames

In the Event that changes all candles to On or Off(i assume in your Inn Bed), you insert this:

Turn Global Switch2 to On or Off (On = All candles turn On, Off = All candles turn Off)
Turn Global Switch1 to On (Now third Eventpage of all Candles is running)
Wait 4
Turn Global Switch1 to Off (3rd Page off all candles is turned off again, but they had time to execute the code)

Alternativly you could use a Script Line in the Event command that is called Script to manipulate a Self Switch of another Event:
This turns Self Switch A of Event 1 , 2 and 3 on this Map to On.

$gameSelfSwitches.setValue([$gameMap.mapId(), 1, 'A'], true)
$gameSelfSwitches.setValue([$gameMap.mapId(), 2, 'A'], true)
$gameSelfSwitches.setValue([$gameMap.mapId(), 3, 'A'], true)

This turns them Off again:

$gameSelfSwitches.setValue([$gameMap.mapId(), 1, 'A'], false)
$gameSelfSwitches.setValue([$gameMap.mapId(), 2, 'A'], false)
$gameSelfSwitches.setValue([$gameMap.mapId(), 3, 'A'], false)

Eventcommand Script on Command Page 3 and in many Eventcommands is helpfull to make the Editor more flexible to use. This list helped me:
No Plugins needed for this.

EDIT:
I forgot about the most simple solution:
If you have 10 Candles, you can use 10 different Global Switches for them. 1 for each of them.
Than it is also easy to turn all of them On or Off.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-make-a-simple-candle-turn-on-and-off.118810/