Login
Remember
IF Answers
Ask a Question

# Quest: "Check Inventory"

0 votes
45 views
asked Jul 7 in Authoring by Anna

Hey All,

I'm trying to make a Command in quest, where the player can type Check Inventory, and it will list the player inventory.

Only problem is, I'm used to only using the basics of the Quest program, and I know nothing about 'Variable, Object, Attribute and Function' which I assume have something to do with it.

Anyone got any advice?

The reason I'm doing this, is because I want to use the 'Retro' theme, and get rid of the pane at the right, as it does not blend in.

Thanks,

Anna

- quest
- lists
- inventory

## 1 Answer

0 votes
answered Jul 7 by hegemonkhan (161 points)
edited Jul 7 by hegemonkhan

I actually think this is already built in... try just typing in 'i' anytime during game play

if not, then:

an example:

the left side's 'tree of stuff' -> Command (its under 'game' ) -> add -> (see below)

    Command Name: check_inventory_command

Command Pattern: i (or whatever you want, for example: chk inv)

Command Script: (click on that notepaper like button in the thin script rectangle box to go into code view just for your Command's script, and see below: type in the below, if you need help: http://forum.textadventures.co.uk/viewtopic.php?f=18&t=4771 ~ you're using a Command, but the location-window is generally the same, find the notepaper like button as seen in Pixie's guide link)

// the indenting matters, so make sure you indent the 'ClearScreen' line. I like to use 2 spaces for my indenting increments~intervals~levels)

http://docs.textadventures.co.uk/quest/functions/corelibrary/displaylist.html
http://docs.textadventures.co.uk/quest/scripts/wait.html

if you want your items to be numbered

    DisplayList (player.inventory, true)
    wait {
      ClearScreen
    }

OR

if you don't want your items to be numbered

    DisplayList (player.inventory, false)
    wait {
      ClearScreen
    }

commented Jul 7 by hegemonkhan (161 points)
edited Jul 7 by hegemonkhan
Elements ( http://docs.textadventures.co.uk/quest/elements/ ):
Objects, Exits, Verbs, Commands, Functions, Attributes, etc. These are your 'physical things' in quest. They actual exist, and can hold other stuff. Or, (if you know English language) think of them as your 'nouns'
Objects: holds Attributes and~or other Objects
Exits: connectors of Room Objects, holds specific Attributes
Commands: holds specific Attributes and Scripting
Functions: holds Scripting
Verbs (GUI~Editor's Verb, as this is actually a Script Attribute added to an Object within the code): holds Scripting
Scripting (my own made-up word):
run as~a script -> add a~new script
scripting is your ACTIONS~EVENTS within quest, it's how you do stuff within your quest game. Or, if you know the English Language, think of them as your 'verbs' (not to be confused with quests 'Verb' Elements, hopefully, otherwise ignore this analogy, lol)
Attributes ( http://docs.textadventures.co.uk/quest/types/ ):
String Attributes, Boolean Attributes, Integer Attributes, Double Attributes, Object Attributes, Script Attributes (the GUI~Editor's Verbs), List Attributes, Dictionary Attributes, etc
these are a bit hard to explain, but hopefully not hard to understand, as they're kind of a hybrid of between Elements and Scripting. They hold data~info~traits~characteristics~etc, but they also are part of creating~causing~doing the ACTIONS~EVENTS within your quest game, too. Or, if you know the English language, think of them as your 'adjectives and adverbs'.

## Related questions

- How do I work with lists in Quest?
- Show amount of gold in inventory
- How can I check the user's command?
- Stopping a message from being said multiple times (Inform 7)?
- Is there a standard way to deal with stacks of items, i.e., having 13 health potions or 6 flowers?

...