RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Chests with SELF-switches [Save those valuable database switches] [PICS]

0 Members and 1 Guest are viewing this topic.

**
Rep:
Level 87
Yep, that's me.
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".
Spoiler for:



[2]
Now make ANOTHER event page, within the event.
Spoiler for:


[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.
Spoiler for:


[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.
Spoiler for:



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:
Quote
Anyway the script call:
Code: [Select]
$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::...
« Last Edit: May 14, 2007, 10:33:28 PM by Sshadow »


Quote from: Djangonator & Irockman 1
<Irockman1>------Djang lacks a brain in that pic.
<Djangonator>---ur mom lacks a braen.

*
Shooting for the "MEMBER MODERATOR OF THE YEAR 2007" Award
Rep:
Level 89
Hi, there.
Quite a few actually.

Here is one for instance

http://rmrk.net/index.php/topic,6343.msg77585.html#msg77585

Thanks for making this though.

You are new so I will point you to where you can find most of these.

http://rmrk.net/index.php/board,8.0.html
Sig by MacGravel

**
Rep:
Level 87
Yep, that's me.
No doubt.
I knew they were out there, but never did I see one within RMRK itself, hence my worry.
[Edit]
I guess I really didn't look too hard then, if there was one right under my nose.


Quote from: Djangonator & Irockman 1
<Irockman1>------Djang lacks a brain in that pic.
<Djangonator>---ur mom lacks a braen.

*
? ? ? ? ? ? ? ? ? The nice kind of alien~
Rep:
Level 92
Martian - Occasionally kind
I think it's a good tutorial and well written. (I have no trouble understand what you mean ^_^)
The only thing it needs is pictures.
This is because the people who usually have trouble with these kinds of events doesn't know the location of event commands very well.
Pictures will show them how the event will look and where the buttons and etc. will be positioned.

On a side note: You can with a simple call script reset the chest ;)

Edit:
I forgot. I think you should change the title to Chests with self-switches or something similar. (A self-switch is still a switch)
I thought that either you checked variables, scripted something or a very weird and probably dysfunctional chest.

Anyway the script call:
Code: [Select]
$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)

Here's an example where the chest is the 4th event in map 3. (Well... has 4 as event ID. Select the event and you can see it as 004)
We turn the local switch A off.
Code: [Select]
$game_self_switches[[3, 4, "A"]] = false
$game_map.need_refresh = true

I do not know why you would want to do it, but you may have your reasons
« Last Edit: May 14, 2007, 09:56:17 PM by Zeriab »

**
Rep:
Level 87
Yep, that's me.
There you go!
Better?


Quote from: Djangonator & Irockman 1
<Irockman1>------Djang lacks a brain in that pic.
<Djangonator>---ur mom lacks a braen.

*
A Random Custom Title
Rep:
Level 96
wah
Yeah, but not your avy. It scares me T_T Also, your sig gives seizures. T_T Lol. Anyways, Zeriab, why would you go about using a Call Script?

*
? ? ? ? ? ? ? ? ? The nice kind of alien~
Rep:
Level 92
Martian - Occasionally kind
Much better. Thank you *hugs*
I think even more people will benefit from this tutorial. ^_^

@mmoo: The call script is small and easy to use in this case. That's why.

****
Rep:
Level 88
And with a single variable you could make a random chest! Hang on... Does anyone want something like that? XD

And, before u posted the pictures it missed out alot.