Game Development Reference
In-Depth Information
On that note, you'll have to make use of
Control Variables as well.
And
Control Self Switch . Otherwise, using the Conditional Branch command would be in vain.
You're essentially using the same event five times.
Did you figure it out? If you think you have (or are stumped), let's resume. The crux of this particular exercise is in
those new event commands that I have not explained yet. I wholeheartedly recommend experimentation throughout
your use of RMVXA. After all, video game design is basically one long sequence of problems to be solved. (The same
can be said of programming.) With that in mind, let's take a look at the Conditional Branch command shown in
Figure 2-13 .
Figure 2-13. The Conditional Branch event dialog
in ruby, and programming in general, a conditional is something that happens when a certain condition is met.
in this case, we're talking about a simple if/else condition. For example, if i have more than three cats, i am a cat person;
else, i am not.
Note
The Conditional Branch command in RMVXA automatically defaults to the switch option. Click the self-switch
bubble and then set it so that the branch check for A is OFF. There's a check box I didn't include in Figure 2-13 that's
titled “Set handling when conditions do not apply.” It defaults with a check mark, but I usually untoggle it. Why, you
may ask? I find it generally easier to make a pair of conditional branches rather than having to handle the exception
(in this case, A is ON) within a single branch. As you work in RMVXA, you'll realize that my way of working with
conditional branches actually results in less clutter. In any case, we won't need the Else that leaving that check box
checked would create, as we don't want the event to execute anything within that branch if the self-switch is already on.
The second new event command we should take a look at is Control Variables . See Figure 2-14 for an image of the
Control Variables menu, as seen when accessed.
 
 
Search WWH ::




Custom Search