Game Development Reference
In-Depth Information
Figure 9-2. The Exit Scroll's general settings
The Exit Scroll is occupying slot 17 in the Database (hurray for lifting those Lite version restrictions). We have
it set so that it can only be used from the menu and is not consumed when used. Why? It's easier to handle item
consumption within the event itself. Instead of just having the item consume itself, it will prompt a choice when used.
It asks the player if he/she wants to leave the dungeon. If the player says no, then the item is left intact. On the other
hand, when the player says yes, the event determines what dungeon the player is currently in and transfers the player
to its entrance, consuming one Exit Scroll in the process.
Creating the Exit Event Logic with Common Events
I use two common events for the exit event logic. Here's the first common event:
Name: ExitEvent
Trigger: None
@>Text: -, -, Normal, Bottom
: : Would you like to leave the dungeon?
@>Show Choices: Yes, No
: When [Yes]
@>Call Common Event: [ExitEventBranches]
@>
: When [No]
@>
: Branch End
It's nice and simple. We ask the player if he/she would like to leave the dungeon. If the player says no, we exit out
of the event. If the player says yes, we call the second common event. I do it this way to reduce the clutter within one
event. You could have a chain of common events, each calling the next one. The rest of the current common event
is executed as applicable. For example, if you were to add a Control Variables command directly below the common
 
Search WWH ::




Custom Search