Getting Containers to work with my old ASL File
lyteside
18 Aug 2009, 19:55I've updated my script to 4.0 (400) in the game code, but the containers don't work right (contents are not displayed when looked at) would there be some other code i need to tell it to work that 4.0 + generates in its asl file to 'activate' this?
Alex
18 Aug 2009, 21:12Containers should work properly with asl-version 400 or later. Can you post a sample code block that doesn't work?
lyteside
18 Aug 2009, 21:32 define object <pen>
displaytype <Object>
give to <Bambi> {
msg <You hand the pen back to Bambi. She rubs it violently on her clothes and slams it back on the counter.>
lose <pen>
}
alias <pen>
alt <pen>
parent <counter>
prefix <a>
take <You grab the pen.>
look <It's just a normal looking pen.>
end define
define object <counter>
displaytype <Object>
alias <counter>
article <it>
gender <it>
alt <counter top; top; surface>
container
end define
define object <filing Cabinet>
displaytype <Object>
alias <filing cabinet>
alt <drawer; filing; cabinet; filing cabinet>
container
open <You open the filing cabinet.>
close <You close the filing cabinet.>
end define
define object <File>
displaytype <Object>
alias <top secret file>
alt <file; directions; paper; direction; secret; top secret; secret file>
parent <filing cabinet>
end define
The filing cabinet is opening and closing, and the file is visible to see when it is open. However, both the filing cabinet and the counter are not listing contents when looked at. Also, the pen is not showing up as visible when after looking at counter.
Alex
18 Aug 2009, 23:28Seems you've come across a Quest bug caused by inconsistent capitalisation. If you change your definition of "filing cabinet" to make it lower-case, it works properly.
Your pen is not showing up because you've defined the counter as a "container" when it should be a "surface". (By default a container is closed, so your counter won't be revealing its contents)
Your pen is not showing up because you've defined the counter as a "container" when it should be a "surface". (By default a container is closed, so your counter won't be revealing its contents)
lyteside
19 Aug 2009, 00:51thanks! half of that worked. Filing Cabinet is fully functional now. The pen, however is still not visible when looking at the counter (which is surface now) and the counter does not list contents... =(
Freak
19 Aug 2009, 09:39Why doesn't Quest detect errors like the filing cabinet problem at load / compile time?