The Inventory and Storing Objects

The Inventory

Rooms are handy because they can contain objects. One special room is inventory - this is the room where all objects that a player has picked up live. This means that the following two Quest commands are (mostly) equivalent:

give <someobject>

and

move <someobject; inventory>

(An exception to the commands being equivalent is that the example using move won't execute any gain script that this object has specified)

If you want to take an object from the player, the lose command will put that object in the current room, just as if the player had dropped it. If you don't want that to happen, you could hide the object instead - the player will no longer have access to that object, as hiding it is tantamount to completely removing it from the game.

Unique Names

Rooms must have unique names in Quest, and, as rooms can have properties and actions associated with them, no room can have the same name as an object, to avoid ambiguity when we use things like the property command.

 

< Back