Hey guys, real speedy question here. How would I create a door that requires two parameters to unlock?
Here's the scenario: I have a room (D5 Door Gate) that has a locked exit (D5_Door) to a second room (D5 Entrance Corridor).
The player needs to swipe two keycards (Access Cards 1 and 2, respectively) into their respective readers (Readers 1 and 2, respectively). That then opens the door.
Now, what I have now is a script that goes like this (sorry about not posting the actual core script; I don't know how to get it from the editor):
Use (Access Card 1) on (Reader 1)
Print "You swipe the card, and a light on the machine turns green." / Switch on dummy_gate_1
Use (Access Card 2) on (Reader 2)
Print "You swipe the card, and a light on the machine turns green." / Switch on summy_gate_2
After switching on dummy_gate_1
If: Object is switched on (object: dummy_gate_1)
Then:
If: Object is switched on (object: dummy_gate_2)
Then:
Print "The door slowly rises."
Unlock exit (exit: D5_door)
The reason I used the objects dummy_gate_1 and _2 (Invisible objects) is because I don't want crafty players bypassing the key card hunt by just saying "switch on Reader 1." There's probably a way to fix that, which would be nice to know.
Also, by using the two "If" scripts in a row, I was basically trying to make an "and" gate. Is there a way to do this that works?
Cheers, guys!