[RMVX ACE] HELP WITH CHESTS
Posts
Pages:
1
I need help in making a chest open again randomly when you leave the floor and go to the floor again. I have a randomizer set on the chests as shown in the link. i don't want the player to open them again and again too many times like maybe 2 or 3 times for each chest. help is appreciated. thanks
http://tinypic.com/r/2ywcw2c/9
http://tinypic.com/r/2ywcw2c/9
Have a variable add one point each time the chest is opened (at the end of the event). On a third page have a condition be set to the highest amount you want the chest checked (let's say three). Also, unless you have a plugin that allows you to control self switches, use a normal switch so you can turn it off when you leave the room (thus resetting the chest).
This will make it so that when that variable reaches 3, instead of running the first page event, it will run the third page event instead - which will be an empty box.
This will make it so that when that variable reaches 3, instead of running the first page event, it will run the third page event instead - which will be an empty box.
How do I make a variable add one point each time the chest is open? Like do you click on variable and type in a new one or click on batch or something? And then would I click on add and click on constant or something? What condition do you use for the third page? So since i'm using rpg maker vx ace, do i make a self switch for it or something? Sorry for asking so many questions, this is my first time doing this and just need help with it.
Ah, I thought you were intermediate, since you had variables in the screenshot. Okay, I'll do some images and explanation. ^.^
Basically you want an event with three pages. The first page will be what you currently have but instead of having a self switch turn on you'll make a custom switch (using the switch event command) and name it so that you know what it is (Random Chest #1 in this case.) Each chest like this will require a new switch, so if you had a second chest like this one you'd make a new switch and call it something like (Random Chest #2) and so on for each chest.
On the second page you would have the open chest graphic and have the condition of that page set to switch: Random Chest #1 is ON.
On the third page you would have the open chest graphic and have the condition of that page set to variable: Random Chest #1 is 3 (or more).
Now, back on the first page, you're going to use the Control Variable event command and have a variable (called Random Chest #1) Add 1.
It should look like this:
- has your randomised eventing
- then has the variable adding (shown in the first image how to do)
- lastly the switch turning the second page on
Second page should look like this:
- nothing on the page (you can add a message or something if you want to say the chest is empty.)
Third page should look like this:
- again, empty unless you want to add some text of some sort.
Basically what this will do is run through a series of checks. The highest numbered page goes first so it'll run checks in that order - check page 3, then 2, then 1.
- First the event will check to see if the variable Random Chest #1 is set to 3.
- If it isn't, it'll check to see if the Switch Random Chest #1 is on.
- If that isn't it'll run the event on page one.
Now the event on page one will give a random item, then add one point to variable Random Chest #1. After that it will turn on the switch Random Chest #1. If you check the event again it will run the same series of checks, but this time it will stop on page two since that's the one that has been triggered by the switch being turned on.
Now, to have it 'respawn' you will have to put a switch event in your exit teleport event that turns off switch Random Chest #1. Like so:
Next time you go into the room and check, the chest will be full again. Checking it will do three things - give you another random item, add another point to the Random Chest #1 variable (now making two points in it) and turn the switch on again so that you get the second page until you leave again.
Leaving again and coming back will trigger the chest being full again. Another check will give you another random item, add another point to the Random Chest #1 variable (three points now) and turn on the switch. This time, however, because there are now three points in the Random Chest #1 variable, instead of jumping to the second page, it will jump to the third.
Leaving again and coming back won't change this because we haven't told the game to change the number of that variable, so from then on every time you come in the room the chest will trigger page three first, meaning it will always be empty.
There you have it~ Hopefully that helps!
Basically you want an event with three pages. The first page will be what you currently have but instead of having a self switch turn on you'll make a custom switch (using the switch event command) and name it so that you know what it is (Random Chest #1 in this case.) Each chest like this will require a new switch, so if you had a second chest like this one you'd make a new switch and call it something like (Random Chest #2) and so on for each chest.
On the second page you would have the open chest graphic and have the condition of that page set to switch: Random Chest #1 is ON.
On the third page you would have the open chest graphic and have the condition of that page set to variable: Random Chest #1 is 3 (or more).
Now, back on the first page, you're going to use the Control Variable event command and have a variable (called Random Chest #1) Add 1.

It should look like this:

- has your randomised eventing
- then has the variable adding (shown in the first image how to do)
- lastly the switch turning the second page on
Second page should look like this:

- nothing on the page (you can add a message or something if you want to say the chest is empty.)
Third page should look like this:

- again, empty unless you want to add some text of some sort.
Basically what this will do is run through a series of checks. The highest numbered page goes first so it'll run checks in that order - check page 3, then 2, then 1.
- First the event will check to see if the variable Random Chest #1 is set to 3.
- If it isn't, it'll check to see if the Switch Random Chest #1 is on.
- If that isn't it'll run the event on page one.
Now the event on page one will give a random item, then add one point to variable Random Chest #1. After that it will turn on the switch Random Chest #1. If you check the event again it will run the same series of checks, but this time it will stop on page two since that's the one that has been triggered by the switch being turned on.
Now, to have it 'respawn' you will have to put a switch event in your exit teleport event that turns off switch Random Chest #1. Like so:

Next time you go into the room and check, the chest will be full again. Checking it will do three things - give you another random item, add another point to the Random Chest #1 variable (now making two points in it) and turn the switch on again so that you get the second page until you leave again.
Leaving again and coming back will trigger the chest being full again. Another check will give you another random item, add another point to the Random Chest #1 variable (three points now) and turn on the switch. This time, however, because there are now three points in the Random Chest #1 variable, instead of jumping to the second page, it will jump to the third.
Leaving again and coming back won't change this because we haven't told the game to change the number of that variable, so from then on every time you come in the room the chest will trigger page three first, meaning it will always be empty.
There you have it~ Hopefully that helps!
Oh wow that is a big explanation and a lot of pictures but it all did help me though and I understood all of it and I tested it out, and it works! Thanks for helping me out, I really appreciate it :)
Pages:
1














