Multiple switches that unlock an event.

I'm trying to figure out how to activate event 5 (A quest)  after 1,2, 3 and 4 events (All of the quests have different NPCs) have been completed.
This is an answer based on RPG Maker XP, but I am sure the options are the same. Make a Conditional branch to check if switch 1 is on, and if it meets the requirements, make another conditional branch inside it to check if switch 2 is on, then another conditional branch and so on until all 4 switches are met. ^^
Use a variable and increase it after interaction with each event?
Use a variable and increase it after interaction with each event?
Honestly this is the least messy way to go about it. Instead of activating a switch for each condition, add to a variable. Then make the event condition check if the variable is equal to whatever you want in order to trigger it.
Variables are also much easier to reuse at other points in the game, where as mass switches can get confusing and to which ones are relevant at [x] pint in your game. 🙂
This depends on how complex those flags should be.


If you simply have 4 quests that must be completed, in any order, then you can use one variable and have each quest increment it by 1 upon completion.


If each quest has some other conditions, or other events depend on the completion (or even incompletion) of these quests, then simply have a switch for each quest.


Now you run into the problem where you want to have 4 switches activated for an another event to run.


Without introducing new scripts, you can use the variable technique for this, while using the switches for other things.


Personally I would rather use a switch for each quest since I'd have much better control over it, but this can be simulated using a variable as well


1 = quest 1 complete


2 = quest 2 complete


4 = quest 3 complete


8 = quest 4 complete


eg: a variable value of 11 means that quest 1, 2, and 4 are complete ( 1 + 2 + 8 = 11)


I find it harder to manage so if I wanted to do it I would use a script such as Bit Switches
You can still increment a variable and use it for the final event, even if the other 4 quests use switches.
Thanks for the help I got it to work.

Original thread: https://forums.rpgmakerweb.com/threads/multiple-switches-that-unlock-an-event.38495/