Conditional Branch

A Conditional Branch is a type of event command that depends on another event switch being on or off. The unique thing about conditional branches is that they give you the option of what to do if the switch hasn't been turned on yet.

I made some more tents and a little boy who lives in one of them. I want him to say "..." if the player talks to him, but for him to say "Wow, did you make that fireball?!" after the player tries to start the fire.

Adding a Conditional Branch

The conditional branch option is on the first page of Event Commands. In this case, my event is a graphic of a little kid.

Green-haired kid Conditional Branch

A box will appear with an option for Switch, and I'm going to leave it as 0001: EV001, the switch that means my player has tried to start the fire.

Now the conditional branch should appear in blue in your command list. Under "Conditional Branch: Switch [0001: EV001] == ON" you should put whatever event you want to happen when the switch is on. In my case, I want the kid to say "Wow, did you make that fireball?!"

Wow!

The "Else" section is what you want to happen all the rest of the time. So before the player throws the fireball, I want the kid to just say "..." He's not interested.

Dot dot dot

And that's it! Your first conditional branch! Go test it out and make sure it works, make sure you didn't get the two parts backwards. There are lots of options available with conditional branches. On the options page, there are 4 tabs worth of variables, including things like how much gold or experience or what kind of item your player has, or whether they've learned a certain skill or not. Have fun!

Dot dot dot Nice one!