[RMXP] Using a User selected number as a combination Chest

0 Members and 1 Guest are viewing this topic.

Level 85
Yeah... about that.....
On on of the games I'm making, I wanted the player to choose a "birthday" for his character, and then later on, have that birthday be the code to a combination chest.

What I did was have a screen at the very beginning where I had the player select a number to represent the character's birthday.

New event, parallel process, and input number. I chose 4 digits, the first two for the month and the last two for the day.  Have that number  be stored in variable 1, which I named "B-day."  You have to either end event processing (I think) or teleport away, or it'll keep on going.

On the chest you want to have the birthday code on, New Event, action key, graphic the closed chest, and another input number, 4 digits.  Have this number saved to Variable 2, named "Chest Code."

Underneath that, on the chest, start a conditional branch, and have the requirement be "Variable 2 = Variable 1."

For the part if it works, have some text there saying something like "It popped open!" and Self Switch A turn on.  Put whatever goodies you want in here.  For the else, have text like "D'aww, wrong number..."

Start a second event page, have the requirement be self switch A on, and have the graphic set to the open chest, and add some text such as "I already got the loot."

Tada!  You now have a chest with a user selected combination!

If anyone has any questions or complaints, please don't hesitate to ask.
This is a signature.

Level 97
2014 Best RPG Maker User - Engine2014 Most Unsung Member2013 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best RPG Maker User (Scripting)2011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best Use of Avatar and Signature Space2010 Favourite Staff Member2010 Most Mature Member
Looks good. I'll move it to the Database