Hi all
As Debsw2003 says, although you can't actually remove an exit in Quest, there are alternative ways of getting the same effect with a bit of lateral thought.
Like Debsw, I'd go for the dual room, dual trapdoor solution. The only bugbear is that you have to make the manipulation of the rooms invisible to the player or it betrays the 'trick' used and looks really naff!
I've used a single key and a flag to control the trapdoor exit capability, and put the whole thing into a little demo so you can see it in a game-like scenario.
It might not be actually opening and closing exits, but it LOOKS like it is to the player, and that's what matters.
Here's my code. N.B. Needs Quest 3.5 beta to run!
define game <Trapdoor demo>
asl-version <350>
game version <1.0>
game author <MaDbRiT>
game copyright <© 2003>
game info <Just an example>
start <hall>
startscript {
flag on <trapdoor_locked>
}
end define
define room <hall>
look <a hallway>
prefix <the>
south {
if flag <trapdoor_locked> then goto <pantry_1>
else goto pantry_2
}
define object <key>
look <old and rusty, but servicable.>
prefix <a>
take
end define
end define
define room <pantry_1>
alias <pantry>
prefix <the>
look <an old fashioned pantry. There is a trapdoor in the floor.>
north <hall>
define object <trapdoor_locked>
look <a heavy wooden trapdoor, securely fastened with a big rusty lock.>
alias <trapdoor>
prefix <a>
use <key> {
msg <The trapdoor unlocks with surprising ease and drops open revealing a flight of steps leading down into darkness.>
outputoff
goto <pantry_2>
outputon
}
end define
end define
define room <pantry_2>
alias <pantry>
prefix <the>
look <an old fashioned pantry. There is a trapdoor in the floor.>
down <basement>
north <hall>
define object <trapdoor_unlocked>
look <a heavy wooden trapdoor. It is unlocked and hangs open.>
alias <trapdoor>
prefix <a>
use <key> {
msg <The trapdoor locks securely, effectively sealing off the stairs down.>
outputoff
goto <pantry_1>
outputon
}
end define
end define
define room <basement>
look <a grim basement>
prefix <the>
up <pantry_2>
end define
define text <intro>
Enter intro text here
end define
define text <win>
Enter win text here
end define
define text <lose>
Enter lose text here
end define
I think all of this can be accomplished from QDK with no problem.
Al