Save-Point
Opening Doors/Chests - 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: Opening Doors/Chests (/thread-2678.html)



Opening Doors/Chests - Firestalker5 - 12-06-2008

EASY DOORS/CHESTS OPENING
By: firestalker5

Introduction

Making events for doors and chest opening can be tedious. You have to set up the event, choose the character set, and then place the event commands. It can take a while if you have a lot of doors or chests.

Wouldn't it be nice if there was an easier way to do it? Well there is... Common Events!

Read on.

Setup
The first thing you need to do is setup the Common Events. This is easy, simply select an empty Common Event and give it a name. Now set the trigger to "None" and you're ready to work.

Common Events are just like normal events only they are processed on any map at anytime [just about]. So all you have to do is set it up like a normal event. I suggest you use the pictures below as a guide, but feel free to do whatever you want to.

I'll explain my reasoning for each command after the jump:
Door Common Event
[Image: DoorCommonEvent.png]
Chest Common Event
[Image: ChestCommonEvent.png]
Ok... This is easy.
The Door and Chest Common Events are exactly alike so I'll explain them together.

Play SE <= Is pretty self explanatory. You want to have some type of sound effect to play when the chest opens. This is that sound effect.
Move Event <= This command is what makes the character set "move". Using the "Turn" commands allows the character set to move with out actually moving from it's position. It's a handy way of making the door or chest open.
Wait for Moves Completion <= Again this is easy. This makes the Event stop processing until the event that is moving is done moving it's designated route.
Wait 5 <= Makes the event wait 5 frames before continuing with the event. In this case I used it as a pause before the event is finished.

The next pictures are for the actual door or chest events. As before I'll explain them after the jump:

Door Event
[Image: DoorEvent.png]
Chest Event
[Image: ChestEvent.png]
Here's the explanation [minus the added stuff from ccoa's UMS].

Call Common Event <= This right here calls the Common Event you just setup. This makes it so all you have to do is call the Common Event everytime you want a door or chest to open. It's easy, right?

Now depending on whether you are working with a door or chest these next commands can differ greatly.

DOOR:
Teleport <= Teleports the player to the desired map and place. The wait command in the Common Event can be lowered or raised if the pause before you teleport is too great or too little.

CHEST:
Amount of Gold <= Give you the desired amount of Gold.
Gain Item/Armor/Weapon/Etc. <= Gives you the desired amount of any item, armor, weapon, etc. you choose.
Message <= This is optional if you have a script taht does it for you. but this will tell the player what he/she got from the chest.
Self Switch "On" <= This will set the Self Switch to on and send the event to the page with the Self Switch on as a start condition. It would be a good idea to have a blank page 2 with the "OPEN" chest graphic on it. this will make it so the player can't keep coming back to the chest and getting the item continously like the magical never-ending chest.

Conclusion:
This, I believe, is an easy way to make the chests or doors in your game open without having to event it all the time. I hope you get something out of this. It's my first tutorial, let me know how I did.