AddInventory (int what)
Adds inventory index WHAT to the current player character's inventory.
is the same as doing character[EGO].inv[WHAT]+=1; It is possibly useful
in a game where the player can control more than one character, since it
will add the inventory to the current player character.
GetInvName (int item, string buffer)
Fills in BUFFER with the name of inventory item index ITEM. This is the
name which the item is given under the Game tab, Inventory mode of the Room
This function is mainly useful for a lucasarts-style status line:
GetInvName (player.activeinv, buffer);
Brings up the Sierra-style inventory window which allows the player
select and manipulate inventory items. If they select one, the cursor mode
will be set to inventory-use (mode 4), and character[EGO].activeinv will
be set to the inventory item selected.
NOTE: This function does not actually bring up the window immediately;
instead, it will show the window when the current script function finishes
NOTE: If the player has no inventory items, global message 996 will be
LoseInventory (int what)
Removes inventory item WHAT from the current player character's inventory.
If they do not have the item, nothing happens.
SetActiveInventory (int inv_item)
Sets the current active inventory item for the current player character
to INV_ITEM. This function changes the player.activeinv variable, and also
sets up the mouse cursor as necessary.
To deselect the current inventory, pass INV_ITEM as -1.
SetInvDimensions (int width, int height)
Allows you to change the default width and height of the inventory
item picture slots used by the Lucasarts-style inventory window. By default,
the LEC inv window is made up of 40x22 pixel cells, but if all your inventory
item pictures are bigger or smaller than this, you can use this
function to adjust them.
Example: (Set inventory Dimension to 80x40 pixels)
SetInvItemPic (int inv, int sprite_slot)
Changes inventory item INV's graphic to be slot number SPRITE_SLOT from
the Sprite Manager. This allows you to dynamically adjust an item's
picture in the inventory window during the game.
The currently selected inventory item (or -1)
Checks if the character is currently using inv number 12
Whether the character is carrying inventory X
Checks if the character is carrying inv number 12