How to use conditional branches to check a value of a variable, and set a number for another variable, then use Yanfly's Event Call to call an event.

Hi guys, how are you doing today? I'm having trouble figuring out how to use conditional branches to check the value of a variable, then set a number for another variable. I tried earlier with a different event, using nested if else conditional branches, but to no avail, it would only show the first if in the if else branches, but still return the original value of the variable I want to check. As you can see below, what I want to do is when a player chooses yes to activate critical mode, it checks to see if the variable(s) I want to check is within a certain range, like if the value from the variable I want to check is greater than or equal to 1, set new variable as 1, or if it's greater than or equal to 11, set new variable to 2, and so on. Then using Yanfly's Event Call plugin, I will call an event that will start when the player is near the crystal I set on the map, and presses the action button, but before that happens, I need the crystal's color changed to symbol the player that critical mode has been activated before the page in the call event is executed. Keep in mind, I know next to nothing when it comes to JavaScripting, so if you plan on telling me what to do by using JavaScript, please explain it to me in a way I'll understand. Thanks in advance for you help!

Regards,
Omarproductions
RPG Maker MV Event Snapshot.png
that is not what your commands tell the event to do.
when the player selects yes, then it controls two switches and then it is told to abandon the entire rest of the event, doing nothing more (exit event processing)

even if the commands you want are on another page that has a higher priority and is conditioned by those switches, that other page needs to be triggered before it can be processed.
That wall of text was a little hard to decipher; I think it might help if you broke it down next time. I'm not trying to be critical, I just think you'll have better luck getting good responses that way.

Anyway, your current event isn't checking anything if the player chooses yes; you put the conditional under the "No" option along with the random variable, so all 'yes' does is activate a switch, a self switch, and exit the event. After that...honestly, I'm not sure what you're hoping to achieve. Follow up with us if you still have trouble after reorganizing and maybe I or somebody else can offer something more concrete.

One other small thing I'd mention is that, if that SE is the same as from Mario Kart 64, you've actually made a game that's illegal for distribution; be careful not to use resources you don't own rights to if you want people to play your game.
Thanks for your reply, as for what I'm trying to do, I'm trying setup a command that checks the value of a variable and see if it's in a certain range, like 1-10, that's what I meant by using greater than or equal to 1. Next after it verifies that the variable is within the condition of the range to be met, it sets a new variable to 1, and if it's in a different range and there'll be 14 ranges to check. This will be done for multiple variables If yes is chosen so I trying to set 9 variables from 9 other variables that will be checked. By the way, the Mario Kart 64 Sound FX will be used for an event I'm hosting, the game will only be available to me, but not be distributed on any game store front.
That wall of text was a little hard to decipher; I think it might help if you broke it down next time. I'm not trying to be critical, I just think you'll have better luck getting good responses that way.

Anyway, your current event isn't checking anything if the player chooses yes; you put the conditional under the "No" option along with the random variable, so all 'yes' does is activate a switch, a self switch, and exit the event. After that...honestly, I'm not sure what you're hoping to achieve. Follow up with us if you still have trouble after reorganizing and maybe I or somebody else can offer something more concrete.

One other small thing I'd mention is that, if that SE is the same as from Mario Kart 64, you've actually made a game that's illegal for distribution; be careful not to use resources you don't own rights to if you want people to play your game.
Thanks for your replay, so wait, I'm confused, what if I call the event, then have it check and set the variables whiten the event that's called, would that work?
that is not what your commands tell the event to do.
when the player selects yes, then it controls two switches and then it is told to abandon the entire rest of the event, doing nothing more (exit event processing)

even if the commands you want are on another page that has a higher priority and is conditioned by those switches, that other page needs to be triggered before it can be processed.
what if I call the event

why call an event at all?

in all experience it has been proven again and again that it is better to NOT chain sequences over multiple events.
all cutscenes should be commanded by a single event with a single page, and the same goes for other sequences.

you can use a call common event if you need the same command sequence multiple times or for similar reasons, but in all other cases all commands that are meant to be executed in one sequence should be on one page of a single event.

and then there is absolutely no problem using a sequence of conditional branches and/or control variable commands.
Problems (especially problems with timing) only pop up if you spread the command over multiple events.
Again, thanks for your reply, I thought calling an event might simplify things for what I’m trying to accomplish, but if experience has thought you that, I guess I’ll try using common events, or try sequence my conditional branches/control variables. I’d greatly appreciate if you can refer me to a site/video that would guide me how to sequence conditional branches/control variables since there might be a few things that I can learn considering I’m not well versed with RPG Maker as a whole.
why call an event at all?

in all experience it has been proven again and again that it is better to NOT chain sequences over multiple events.
all cutscenes should be commanded by a single event with a single page, and the same goes for other sequences.

you can use a call common event if you need the same command sequence multiple times or for similar reasons, but in all other cases all commands that are meant to be executed in one sequence should be on one page of a single event.

and then there is absolutely no problem using a sequence of conditional branches and/or control variable commands.
Problems (especially problems with timing) only pop up if you spread the command over multiple events.
that is basic eventing - just place one control variable after another or after a conditional branch.
the only thing you need to check there is the indenting of the conditional branches - that is there to help you see which part of a branch any command is in, even if the sequence gets longer than one screen.
Thanks for your reply once again, all I have to say is DOH, I should have known that from coding classes that I took in college. Thanks for your help, I’ll be sure to give that a try and report back ASAP. You have a nice one.
that is basic eventing - just place one control variable after another or after a conditional branch.
the only thing you need to check there is the indenting of the conditional branches - that is there to help you see which part of a branch any command is in, even if the sequence gets longer than one screen.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-use-conditional-branches-to-check-a-value-of-a-variable-and-set-a-number-for-another-variable-then-use-yanflys-event-call-to-call-an-event.148099/