Multiple locks on a door?
Echoparticle
10 Feb 2014, 21:30There's a puzzle I have in mind that requires both unlocking a door with a key, only to find that it is wedged shut, so the player must fashion a lubricant agent and apply it to the door so that they could force it open. How do I go about doing that?
Also, hi, I'm Tim. I'm new here.
Also, hi, I'm Tim. I'm new here.
george
10 Feb 2014, 22:49Hey Tim, welcome. First off there are a couple of articles on the wiki that are useful here,
http://quest5.net/wiki/Hs-lockedexits
http://quest5.net/wiki/Using_lockable_exits
http://quest5.net/wiki/Unlockdoor
You probably want two boolean attributes, locked and stuck. An exit will already have a "locked" attribute set to true or false.
You'll notice on the Exit tab in the GUI there's a checkbox for 'Run a script (instead of moving the player automatically)'. You can check that and put an if check there to see if the exit (or door object) is still 'stuck'. If it is, don't let the player go. If it's not, move the player through the exit,
http://quest5.net/wiki/MoveObject
Then you'll want a 'use object on another object' kind of script with your lubricant. You'll see an example of that in one of the articles above, http://quest5.net/wiki/Hs-lockedexits . Instead of directly unlocking the exit as a result of that script you'll just change the 'stuck' attribute to true.
http://quest5.net/wiki/Hs-lockedexits
http://quest5.net/wiki/Using_lockable_exits
http://quest5.net/wiki/Unlockdoor
You probably want two boolean attributes, locked and stuck. An exit will already have a "locked" attribute set to true or false.
You'll notice on the Exit tab in the GUI there's a checkbox for 'Run a script (instead of moving the player automatically)'. You can check that and put an if check there to see if the exit (or door object) is still 'stuck'. If it is, don't let the player go. If it's not, move the player through the exit,
http://quest5.net/wiki/MoveObject
Then you'll want a 'use object on another object' kind of script with your lubricant. You'll see an example of that in one of the articles above, http://quest5.net/wiki/Hs-lockedexits . Instead of directly unlocking the exit as a result of that script you'll just change the 'stuck' attribute to true.
Echoparticle
11 Feb 2014, 20:07Thanks a bunch, buddy.