A way to fix redundant IF Else branch?

I wanted to make it so the King asks if you have more people until Two switches are on. That being Prophet Join and Epic Appear.
I thought I had done something like this on my project before but never came across it. I would want it to be as I said asking for more people and then when both are on asks for your help and the open the war room.
That's just how RPG Maker MV works, unfortunately. Though you can sort of fix it with plugins and script calls:

https://forums.rpgmakerweb.com/index.php?threads/conditional-branch.63723/
That's just how RPG Maker MV works, unfortunately. Though you can sort of fix it with plugins and script calls:

https://forums.rpgmakerweb.com/index.php?threads/conditional-branch.63723/

So let me see if I understand your plug-in I would make a branch but it would contain Check.all_true(29, 35) then it would run the else statement?
The If part would run if both switches #29 and #35 are on, the Else part would run if one or both of those switches are off - so you only need one conditional branch for the whole check. You don't necessarily need a plugin for that, but it makes the script a bit easier to read; if you want to try it without the plugin,
Code:
$gameSwitches.value(29) && $gameSwitches.value(35)
in the Script field of the Conditional Branch does the same.
The If part would run if both switches #29 and #35 are on, the Else part would run if one or both of those switches are off - so you only need one conditional branch for the whole check. You don't necessarily need a plugin for that, but it makes the script a bit easier to read; if you want to try it without the plugin,
Code:
$gameSwitches.value(29) && $gameSwitches.value(35)
in the Script field of the Conditional Branch does the same.
Sorry I came back after trying to reply in a hurry. Indeed I meant it would run the else if only one of the switches are on. You can actually trigger these events at different times is why I was trying to set this up.
You can do something like this:

Code:
If switch 1 is ON
  If switch 2 is ON
    ... do stuff
    Exit Event Processing
  End
End

... you only get to here if one of the switches is off, so if you're doing the same code when one or the other is off, just put it here, once
So let me see if I understand your plug-in I would make a branch but it would contain Check.all_true(29, 35) then it would run the else statement?

Yes, that's right. Though everything suggested in this thread would work as well. LadyBaskerville has the no-plugin-required solution, and Shaz's is a more elegant way to solve it without scripting. Though you could also do something like "jump to label" if you want something else to run after the event since exit event processing quits the event altogether.
I went the variable route for my quest. My switches could be triggered out of order. The quest is centered around speaking to 3 class masters. Then returning to your father to choose your profession. Who then gives you a letter of recommendation for that class master. You could not choose your profession unless all 3 class masters had been spoke too. A pain to event with IF statements.

I replaced 3 switches with 1 variable. Each time the player spoke to one of the class masters it increased the variable amount by 1. Once the variable reached 3 or greater the IF would be statement triggered.
Thank you one and all. I have went with mjshi's plugin. Since I have no experience with variables yet and I can make multiple switch checks I feel this method will help me in the long run. I tested it out here before I get some rest and it worked like a charm. Makes me wish some days I knew how to actually code. Once again thank you all for the help you provided, it's much appreciated.
Sorry, late to the party but I have a tip that comes in handy. You probably have variables like Count or Index that you reuse over and over whenever you need to store a one-off value for use in any given common or normal event. Store a value, use it and then forget about it until you need to do a similar type thing later on.

You can also do this with Switches, of course. I usually call mine Bool, bOk or just Ok for some reason although that's not important. What you do in a situation like this is set Bool to false at the very beginning. Then when you have your redundant parts, just set Bool to true. At the very end, check Bool and of its true, execute the thing you'd be doing each time you set Bool to true. Simple as that. You only have to do it once and if you ever need to make changes, you only have to update it in one spot.

Here is an example from one of my games.

snap.png

Original thread: https://forums.rpgmakerweb.com/threads/a-way-to-fix-redundant-if-else-branch.90329/