im try to make an airlock when you first get in a menu pops up then it ask close aft or open fwd what i want to do it make it so if the player opens fwd first then he gets sucked out the aft and bye bye birdy but if he closes the aft first then opens the fwd then he can go on with out being sucked out
action <speak> {
if ask <Did you bring down your sheets?> then flag on <answer>
else flag off <answer>
if flag <answer> and got <Sheets> then speak <Good job! Now go put them in the laundry room.> else {if flag <answer> and not got <Sheets> then speak <Don't lie to me. I know you don't have the sheets. Go back upstairs and get them!>}
if not flag <answer> and not got <Sheets> then speak <Go back upstairs and get the sheets!> else {if not flag <answer> and got <Sheets> then speak <Stop messing around. Go put those sheets in the washing machine.>}
}
' "Airlock Demo"
' Created with QDK Pro 3.52
define game <Airlock Demo>
asl-version <350>
game author <MaDbRiT>
gametype singleplayer
start <bay>
game info <Created with QDK Pro 3.52>
startscript {
flag on <outer_closed>
flag off <inner_closed>
}
end define
define synonyms
end define
define room <bay>
alias <cargo bay>
prefix <the>
look <A cavernous, empty hold, unlit except for the light spilling in from _
the open airlock. >
place <the; airlock>
end define
define room <airlock>
prefix <the>
out <the; bay>
script msg <|nThe airlock has simple controls, allowing the user to seal _
or unseal the inner or outer hatches. Someone has scrawled a warning and _
taped it to the wall. _
It says; |cr|b|s18|nBE CAREFUL - SAFETY INTERLOCK BROKEN!|s00|cb|xb>
description {
msg <a small, almost featureless room. |nThe inner hatch is |xn>
if flag <inner_closed> then msg <sealed shut.> else msg <open.>
msg <The outer hatch is |xn>
if flag <outer_closed> then msg <sealed shut.> else msg <open.>
}
afterturn override if not flag <outer_closed> and not flag <inner_closed> then {
msg <There is a huge explosion as the ship instantly depressurises - _
blasting you and most of the ship's contents into space in lots of _
little pieces...|n|n(You must NEVER have both hatches of an airlock _
open at the same time)>
playerlose
}
command <seal inner;seal inner hatch;close inner;close inner hatch> {
if flag <inner_closed> then msg <The hatch is already sealed shut.> else {
msg <The hatch door hisses as it seals shut.>
flag on <inner_closed>
create exit out <airlock;>
}
}
command <seal outer;seal outer hatch;close outer;close outer hatch> {
if flag <outer_closed> then msg <The hatch is already sealed shut.> else {
msg <The hatch door hisses as it seals shut.>
flag on <outer_closed>
create exit out <airlock;>
}
}
command <unseal outer;unseal outer hatch;open outer;open outer hatch> {
if not flag <outer_closed> then msg <The hatch is already unsealed.> else {
msg <The hatch door unseals with a loud hiss.>
flag off <outer_closed>
create exit out <airlock;space>
}
}
command <unseal inner;unseal inner hatch;open inner;open inner hatch> {
if not flag <inner_closed> then msg <The hatch is already unsealed.> else {
msg <The hatch door unseals with a loud hiss.>
flag off <inner_closed>
create exit out <airlock;bay>
}
}
end define
define room <space>
look <floating weightless outside the ship. Beneath you a dull red glow _
emanates from the open airlock.>
down <airlock>
end define
define text <intro>
end define
define text <win>
end define
define text <lose>
end define