Game Development Reference
In-Depth Information
You might wonder why at all we have to do this. After all, Conditional Branch also has an option on page 2 to check
for a particular actor's name. Well, let's follow that thought process and work out a simple riddle event. In theory, your
riddle event could look as simple as this.
@>Text: -, -, Normal, Bottom
: : What is that which has one voice and yet becomes
: : four-footed and two-footed and three-footed?
@>Name Input Processing: , 5 characters
@>Conditional Branch: [] is Name 'human' Applied
@>Text: -, -, Normal, Bottom
: : Correct.
@>
: Else
@>Text: -, -, Normal, Bottom
: : Wrong.
@>
: Branch End
@>
We have a single text box giving the riddle to be solved, and then a screen comes up, so that the player can write
in his/her answer. The screen in question is displayed in Figure 11-4 .
Figure 11-4. The Name Input Processing event command in action
However, as you'll quickly find, if you do not write human exactly as I did in the relevant sentence, you will
receive an error message. After all, the conditional branch is looking for “human,” not “hUmAn” or “HUMAN.”
It also doesn't solve the minor problem that the blank actor's name will not be cleared if the player writes an incorrect
answer. So, let us begin with our small snippets of Ruby script.
 
Search WWH ::




Custom Search