Container Contents

VTMom
16 Jul 2019, 13:37

I'm a complete beginner, writing my first game. When a container is opened, I would like the contents to be displayed in a list. I've tried to follow the fridge example in the tutorial (https://docs.textadventures.co.uk/quest/tutorial/using_containers.html) , checking "list children when object is opened," but contents still only show on side of screen, not in main text. Could someone please let me know how this is done?

Thanks.


mrangel
16 Jul 2019, 19:15

"list children when object is opened" should be what you want.

How is the object being opened? Is it the built-in 'open' command?

If you're opening the object using a script of your own, you'll have to display the contents yourself. The script would look something like:

msg (FormatObjectList ("The box springs open. It contains ", wooden box, "and", "."))

(replacing wooden box with the actual name of the container)