' "lamptest"
' Created with QDK 3.52 - UNREGISTERED VERSION
!include <Typelib.qlb>
define game <lamptest>
asl-version <350>
gametype singleplayer
start <Itemarium>
game author <Dennis Gustafsson>
game info <Created with QDK 3.52 - UNREGISTERED EVALUATION VERSION.>
background <blue>
foreground <white>
command <light lamp> if got <Lighter> and got <lamp> and property <lamp; candle=true> then {
property <lamp; lit=true>
msg <Light!>
}
else msg <No luck..>
command <light lamp> if got <Lighter> and got <lamp> and property <lamp; bluecandle=true> then {
property <lamp; bluelit=true>
msg <Blue Light!>
}
else msg <It is still dark.>
end define
define synonyms
end define
define room <Itemarium>
description <You are in the itenarium.>
define object <Candle>
take
type <TLTobject>
type <TLTcontainable>
properties <size=2; weight=2>
action <lit=true> msg <Light!!>
action <contained> property <lamp; candle=true>
end define
define object <Blue candle>
take
type <TLTobject>
type <TLTcontainable>
properties <size=2; weight=2>
action <contained> property <lamp; bluecandle=true>
end define
define object <lamp>
take
type <TLTobject>
type <TLTcontainer>
type <TLTcontainer>
properties <candle=false; bluecandle=false; lit=false; bluelit=false; listHeader=In the lantern is fitted with; sizeLimit=2; weightLimit=2; listHeader=In the lantern is fitted with; sizeLimit=2; weightLimit=2>
end define
define object <Lighter>
take
end define
end define
define text <intro>
end define
define text <win>
end define
define text <lose>
end define
(Start of new game)
You are in the itenarium.
> take lamp
Taken.
> take candle
Taken.
> put candle into lamp
> x lamp
Nothing out of the ordinary.
In the lantern is fitted with a Candle.
> take candle from lamp
Taken.
I could get the candle and put it into the lamp with my original code..
Anyway now I can take candles and put them in the lamp.
And take them from lamp as well. Sweet. Thanks a bunch!
But now I've made them regular object:
So what does "regular object" mean exactly. It's not self explanatory..
Any chance of a theory on why the lamp won't change it's lit=false to lit=true
when I type light lamp? (with the candle fitted and lighter in inventory)
' "lamptest"
' Created with QDK 3.52 - UNREGISTERED VERSION
!include <Typelib.qlb>
define game <lamptest>
asl-version <350>
gametype singleplayer
start <Itemarium>
game author <Dennis Gustafsson>
game info <Created with QDK 3.52 - UNREGISTERED EVALUATION VERSION.>
background <blue>
foreground <white>
command <light lamp> {
if got <lighter> and got <lamp> then {
if property <lamp; hasBluecandle> then {
property <lamp;bluelit>
msg <Blue light!>
}
else {
if property <lamp; hasCandle> then {
property <lamp;lit>
msg <White light!>
}
else msg <There's no candle in the lamp to light.>
}
}
else msg <You can't do that.>
}
end define
define synonyms
end define
define room <Itemarium>
description <You are in the itenarium.>
define object <Candle>
type <TLTobject>
type <TLTcontainable>
properties <size=2; weight=2>
action <lit=true> msg <Light!!>
action <contained> property <lamp; hasCandle>
end define
define object <Blue candle>
type <TLTobject>
type <TLTcontainable>
properties <size=2; weight=2>
action <contained> property <lamp; hasBluecandle>
end define
define object <lamp>
type <TLTobject>
type <TLTcontainer>
properties <listHeader=The lantern is fitted with; sizeLimit=2; weightLimit=2>
end define
define object <Lighter>
type <TLTobject>
end define
end define
define text <intro>
end define
define text <win>
end define
define text <lose>
end defineYes Sir I have.
And they have not bounced back to me..