Game Development Reference
In-Depth Information
We have a conditional branch for each separate direction. Of course, it wouldn't be much of a puzzle if both
statues moved identically, so we make it so that the right statue (that would be the red one) moves on an inverted
horizontal axis. In simpler terms, the red statue will move left when the player presses right and right when the player
presses left. Notice how I only use the wait command once per branch. There's nothing wrong with having a wait
command on the left statue's movement as well, but it just makes the puzzle take longer. When you set it up as I have,
both of the statues will move in response to the key press, and the puzzle flows faster. Here's the second half of page 1:
@>Conditional Branch: The X Button is Being Pressed
@>Text: -, -, Normal, Bottom
: : Reset the statues?
@>Show Choices: Yes, No
: When [Yes]
@>Set Event Location: [LeftStatue], (012,010)
@>Set Move Route: [LeftStatue]
: : $>Turn toward Player
@>Set Event Location: [RightStatue], (014,008)
@>Set Move Route: [RightStatue] (Wait)
: : $>Turn toward Player
@>Scroll Map: Down, 5, 4
@>Set Move Route: Player (Wait)
: : $>Direction Fix OFF
@>Control Switches: [0030:StatuePuzzleStart] = OFF
@>
: When [No]
@>
: Branch End
@>
: Branch End
@>Label: SpotCheck
@>Control Switches: [0031:ButtonPressOFF] = OFF
@>Control Switches: [0032:ButtonPress] = ON
@>
As mentioned before, we want the player to have a way to stop the puzzle if he or she would rather do something
else. RMVXA has three otherwise functionless buttons named X, Y, and Z that tie into the A, S, and D keys of a
keyboard, respectively. So, when the player presses A during the puzzle, the game will ask if he or she wishes to reset
the statues. Saying no does nothing, but saying yes returns both statues to their initial positions. We scroll the map
down the number of squares that we had moved it up previously and turn off the Direction Fix that we had imposed
on the character.
At the very bottom of page 1, we have the SpotCheck label referenced in the quartet of directional conditional
branches. The pair of button press switches is used for flow control. In essence, we want the following sequence:
The player presses one of the arrow keys. The relevant actions are processed and switches are
flipped, causing the Parallel Process page to execute page 2.
Page 2 of the event checks to see if both statues reached their respective pedestals in that
particular button press.
If they didn't, we toggle switches such that page 1 is now ready to be executed once again.
It is functionally a two-page loop that can be broken by puzzle completion or the player pressing A and selecting
Yes. With that said, page 1 requires that StatuePuzzleStart and ButtonPressOFF be on. Page 2, on the other hand,
requires that StatuePuzzleStart and ButtonPress be on. Don't let the minor switch name differences trip you up!
Search WWH ::




Custom Search