Game Development Reference
In-Depth Information
Figure 2-15.
The Priority and Trigger settings for the tree
@>Text: -, -, Normal, Bottom
: : This tree looks rather peculiar.
@>Conditional Branch: Self Switch A == OFF
@>Control Variables: [0001:Tree] += 1
@>Control Self Switch: A =ON
@>
: Branch End
@>
•
As noted earlier, an event with the priority “Same as Characters” exists on the same graphical
layer as the player.
•
On that note, you won't be able to step on top of the event's square, so the trigger should be
Action Button.
•
The conditional branch checks to see if the event's self-switch A is off. If it is, then it adds one
to the value of Tree and turns self-switch A on, preventing a single tree from adding more than
one to the variable.
•
Copy-paste this exact event to the four other trees you have placed on the map, and you're
done. You can do this by right-clicking the event on the map editor and selecting
Copy
, then
right-clicking the square you wish to paste the event to and selecting
Paste
. Alternatively, you
can use the
Copy Event Page
button within the event properties.
What's the Point?
There is no greater honor than botany. No? Okay, fair enough. Let's add a final event that requires the Tree variable to
be at 5. We'll make it a treasure chest, to show off the relevant Quick Event.
•
First, find a nice unoccupied space on your second map.
•
Right-click and select the Treasure Chest event from Quick Event Creation.
•
Because the quest involved trees, let's give the player something made with wood as a reward.
Select the Longbow from the list of weapons and then press OK.