13 March 2010

Chapter 5: Trapped Chests - The Complete Chest Tutorial

Continuing the Chest Tutorials, we're now going to create a trapped chest, i.e. when you open it, it will trigger a random trap, which will cause damage or affect the player's status.

To begin, create a basic chest (as detailed in Part 1), we'll need to set up the randomized traps, then 4 additional Conditional Branches with the different traps triggered, including one where you avoid the trap.

The following routine is placed after the third Wait Command and before the rewards (called with the "Random Contents" Call Event we defined in Part 3).
<>Variable Oper: [0001:Randomizer] Set, Rnd [1-4]
<>Branch if Var [0001:Randomizer] is 1
  <>Show Battle Animation: Fire Breath, Hero (Wait)
  <>Message: You triggered a fire trap.
<>Change HP: Entire Party's HP 10 Remove
: End
<>Branch if Var [0001:Randomizer] is 2
  <>Show Battle Animation: Ice Breath, Hero (Wait)
  <>Message: You triggered an ice trap.
  <>Change HP: Entire Party's HP 10 Remove
: End
<>Branch if Var [0001:Randomizer] is 3
  <>Show Battle Animation: Poison Breath, Hero (Wait)
  <>Message: You triggered a poison trap.
  :         You've been poisoned!
  <>Change Cond: Entire Party Poison Inflict
: End
<>Branch if Var [0001:Randomizer] is 4
  <>Message: You avoided the trap.
: End

With that in place, the chest will open normally and you'll receive the goodies from within the chest after the trap has been triggered.

2 Comments So Far:

Anonymous said...

Your tutorials here are quite handy. Thanks for writing them.

Companion Wulf said...

You're welcome. So glad you can benefit from them. If you have any suggestions for further expansions on this tutorial, feel free to comment them. Thanks for visiting.

Post a Comment

Related Posts with Thumbnails
Template Design "Perfect World" by SkinCorner