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.
[RMXP] Using a User selected number as a combination Chest

0 Members and 1 Guest are viewing this topic.

***
Rep:
Level 86
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.

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