Home > Tutorials > RPG Maker 2003 > Self-Switches for Chests (rpg2003)
Self-Switches for Chests (rpg2003)
I figured this out just today, although it's unlikely to be useful for anyone programming with XP or VX.
You know how typically when making a chest you have to hold it open with something, or it resets to pre-opened when you exit the screen? You usually set it to a switch, but you have to severely limit how many chests you have, or sooner or later, you run out of events for the main game. You set it to having an item, but this too has problems (if you use it up, the box is back the next time, if it's equipped, it doesn't appear with the items, and this doesn't account for money). I also tried simply setting it to the event facing up, but of course, facing resets on exiting the screen.
So trying to make something set ON irreversibly (threw out variables, since most had too many conditions to being on), save switches (threw out switches), not be item dependent but chest opening dependent, and which could be repeated in a different area without turning on the first, and I came up with the following.
Make a few names. These won't be characters in the party, and they will never be named or renamed. In fact, the average player won't see them. Also, make a number of skills (for chests, let's say about 100) and name them after the events you're storing. We'll start with one, let's call it Storage.
Open the chest as normal (with SE if needed), but instead of starting with just the animation, item message, and giving you the item, followed by a switch, do this.
If Hero Facing Up
If Storage has Chest1 skill
(Open chest)
Message: The chest is empty!
Else
(Open chest)
Message: You got (whatever)!
Add Item (whatever)
Storage, Add Chest1 Skill
End
End
There you have it, a single page skill which effectively eliminates the switches you'd need for other stuff. But wait, won't skills fill up instead? No. If you want more than 100 chests, simply make more names (name by region, or even town). Then send to that name. The character will have their own skills. So Chest1 as a skill being had by character Town1 will not trigger something in Town2, because it isn't had by Town2.
|
|
Details
|
|
Tutorial:
|
Self-Switches for Chests (rpg2003) |
|
Date Listed:
|
2011-07-11 |
|
Author:
|
bulmabriefs144
|
|
Total Hits:
|
2136 |
|
|