Save-Point
Conditional Branch: Chests Tutorial - Printable Version

+- Save-Point (https://www.save-point.org)
+-- Forum: Games Development (https://www.save-point.org/forum-4.html)
+--- Forum: Tutorials (https://www.save-point.org/forum-19.html)
+--- Thread: Conditional Branch: Chests Tutorial (/thread-2658.html)



Conditional Branch: Chests Tutorial - Hebi Kumo - 11-06-2006

Conditional Branch

Introduction

I'm sure you have read my Tutorial on keeping chests open after you get an item from it (if not click here). Now lets use the information from that Tutorial and teach you about conditional Branches in RMXP.

Basic Conditional Branch

A conditional branch is an event or part of an event that says in short you have to do this, have this item, talk to this person before you can move on in the game (i e a key to unlock a door).

Set Up The Chest Event

1) Right click where you want the chest and click NEW EVENT.

2) Then Click the button: CONDITIONAL BRANCH.

3) Now click the tab number FOUR (4) and check the box that says ITEM.

4) Then pick the item the player needs to have before they can open the chest. Then click OK.

5) Now in the EVENT COMMAND box right below the words: CONDITIONAL BRANCH: [name of item] POSSESSED double click the: <> symbol and set up your ITEM Event Like so:

Quote:a) Click the CHANGE ITEM button or Money or Skill, etc that you want in the chest.
Quote:*If you wish then choose the MESSAGE button and have it say something like: “ You Found 1 Potion.”
B) Now click the SWITCH OPERATION button. When the window pops up click the SQUARE button with the three dots on it ( ...).
c) Give the Switch a name, i. e. CHEST--OPEN and click OK.
d) Then click OK again to go back to the EVENT COMMANDS window.
e) Now click the NEW PAGE button.
f) On the new page check the box that says SWITCH then click the SQUARE button (with 3 dots) and pick the Name of the SWITCH you want.
g) Now go to the GRAPHIC and pick the OPEN CHEST image of the chest you are using.
Quote:*If you want you can use the MESSAGE button to have it say something like: “It is Empty” in-case the player tries to see what would happen.

6) Now click the <> below the ELSE HANDLER.

7) Click the MESSAGE button and say what you would like (i e “You need a Key to open this chest”)

And that should do it.

---Lord Rasler