Why has this not been created before?
My bad if it has, noobie slap for me.
Okay, well basically I'll teach you how to make a treasure chest WITHOUT using those valuable switches, of which you have a limited number.
INSTEAD we'll use a self switch.
Much cleaner, and better.
I believe this is an Rpg-Maker XP feature... so sorry all you other guys.
ANYWAY:
Make a chest, there's TONS of tutorials of how to make them, so I won't clutter the board with another one.
[1]
Once you have your chest, at the VERY end of your event command list, place a "Self switch A = On".
[2]
Now make ANOTHER event page, within the event.
[3]
On the SECOND page, set the conditions, to "Self switch A = On".
Set the graphic of this SECOND page, to the open chest of your choice.
[4]
Drop a little message on there like, "The chest is empty..." if you must.
REMEBER, we are dealing with the second page, got it? I highlighted the important things to remember.
Bam, you're done.
Rinse and repeat.
Basically, once you recieve your treasure and everything, it turns on that self switch.
If the switch has been turned on, it SKIPS the first page, and goes to the second.
Which should be empty, well not EMPTY, but basically shouldn't give him anything.
So, he can retrieve the item once, but after that it's empty.
Forever.
This method DOES persist throughout map changes.
There's NO way to reset the chest, unless you reset the game.
[EDIT]
Actually ther is ONE way to reset it, with some simple code:
Anyway the script call:
$game_self_switches[[MAP-ID, EVENT-ID, "LOCAL-SWITCH"]] = flag value
$game_map.need_refresh = true
where MAP-ID is the map id or map number if you will.
where EVENT-ID is the number of the event in the map.
where "LOCAL-SWITCH" is either "A", "B", "C" or "D" depending on which local switch you want to select
flag value is the value you will set the switch to. If you want to turn the switch ON set it to true otherwise false. (i.e. OFF)
Credit to:
Zeriab [For the code to reset the switches[and helpfulness]]
Did I get anything wrong?
Well let me know if Im wrong or something, and I'll fix it up.
Or if you need screenshots, or a demo, I'd be glad to put them up.
ENJOY THOSE SWITCHES YOU JUST FREED UP.
=]
...::Shadow::...