Most adventure games allow the player to carry a set of objects, which he can
then use to solve puzzles. Adventure Game Studio makes this inventory easy
for you to manage.
Every inventory item which the player may carry during the game at one time
or another is listed under the "Inventory items" node. Here, each item
has a number and a script name which you use in scripts to identify the object.
To create a new item, right-click on the "Inventory items" node.
Double-click on an inventory item to open it up. On the
left you'll see the graphic used for the object in the inventory window. To change
this, select the "Image" entry in the property grid on the right, and click the "..."
button.
The last thing to do with the inventory items is to define their events:
what happens when the player manipulates them in the inventory window. Click
the "Events" button (the lightning bolt button at the top of the property grid),
which brings up a list which works identically to the hotspot events.
The available events are described in the reference section.
NOTE: Each character in the game carries their own set of inventory items.
This means, if you want to create a game like Day of the Tentacle, where the
player can control three different characters, each character will have a
separate inventory.
You have two choices about how the inventory is displayed to the player -- a
built-in inventory window to get you started, and support for custom inventory
windows when you're ready to make your own.
The default option is the Sierra-style pop-up inventory window, which is
popped up by clicking on the Inventory icon on the icon bar. You can also have
the current inventory item displayed in its own button on the icon bar by creating
a button on the GUI and setting its text to (INV) which stretches the item
picture to the button size, or (INVNS) which draws the inventory item
picture straight onto the button with no resizing. Finally, (INVSHR) , probably
the best option, will draw it at actual size if it will fit, or shrink it if not.
The other option is a custom inventory window. To use this, you
will need to edit the GUI to add it, so I will explain this later on.
While you are starting off with AGS, it is recommended to use the supplied
standard Sierra-style inventory window.
Finally, you may have noticed a "Hotspot Marker Settings" frame at the top of the
Inventory pane. This allows you to switch on an option so that when the
selects an inventory item, the mouse cursor for it will have a dot and mini-crosshair
drawn on it, to show the player where the hotspot is.
You can enter the colour for the centre dot and also for the surrounding 4 pixels.
|