How do I get a chest and door to only open with a key

Project 7

Veteran
Veteran
Joined
Aug 26, 2017
Messages
45
Reaction score
2
First Language
English
Primarily Uses
N/A
I'd like to make chests and doors that can only open when the player has obtained a key. I need help getting that to work and making keys to go to the specific doors and chests. Please help and thank you very much.
 

SimProse

Veteran
Veteran
Joined
Jul 9, 2016
Messages
371
Reaction score
202
First Language
English
Primarily Uses
For specific keys to certain chests, I would set a variable or switch when you pick up the particular key. That way, you can just do a conditional branch to check if the player picked up the key already.
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,713
First Language
English
Primarily Uses
RMVXA
Create as many unique keys in your database as you need.
Decide which key will open which particular chest or door..
For the sake of this example, let us say that you want the Bronze Key to open a particular chest.
On the chest event use a conditional to check if the Bronze Key is in the inventory.
If it is, the chest opens
If it's not, then in the 'Else' section, put some message or other telling the player they need a key.

EDIT
Ninja'd by about 2 seconds!
 

Project 7

Veteran
Veteran
Joined
Aug 26, 2017
Messages
45
Reaction score
2
First Language
English
Primarily Uses
N/A
Okay, but how do I create unique keys in the data base?
 

Tai_MT

Veteran
Veteran
Joined
May 1, 2013
Messages
5,476
Reaction score
4,862
First Language
English
Primarily Uses
RMMV
Open the Database to the items and create them under that. Each entry is a "unique item". So, if you create them as "Keys", then they're "Unique Keys".
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.
Can someone recommend some fun story-heavy RPGs to me? Coming up with good gameplay is a nightmare! I was thinking of making some gameplay platforming-based, but that doesn't work well in RPG form*. I also was thinking of removing battles, but that would be too much like OneShot. I don't even know how to make good puzzles!
one bad plugin combo later and one of my followers is moonwalking off the screen on his own... I didn't even more yet on the new map lol.
time for a new avatar :)

Forum statistics

Threads
106,018
Messages
1,018,357
Members
137,803
Latest member
andrewcole
Top