- Home /
Make doors open with different keys?
I am currently making a game in a mansion, the doors need to be opened but each with a different key so the player can't skip. Can somebody please send me a code, I have a code that opens a door with a key but the key opens all the doors, thanks.
Hello, can you post this code ? So I can adapt it to do what you need.
Answer by iwaldrop · Jun 15, 2013 at 06:04 AM
I'm not going to give you code without seeing yours first, but you need some kind of key, right? What do you think that should be? A number, a word, or anything unique will work. When the player enters the door's trigger then it should not only check to see if its a player that just entered, but if that player has the required key as well.
So, a player should have a keychain, that keychain should have a list of keys, and when a player enters a door's trigger, that trigger script needs to query the keychain to see if the key is present. If you intend for keys to only be used once, then you should also remove the key from the keychain. If you want to share some code, update your question and I'm sure you'll get some more bites.
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Door opening with a key, my scripts and problem 1 Answer
my script not working..!!! 1 Answer
How to make 2 doors with 2 diffrent keys 2 Answers