spacer graphic
spacer graphic
Montage of games AGS Logo
spacer graphic

 

spacer graphic
Menu
spacer graphic Home
About
News
Features
Download AGS
spacer graphic Games 
Games main page
Award Winners
Picks of the month
Short games
Medium length games
Full length games
In Production
Hints & Tips
Community
Forums
AGSers World Map
Member websites
Chat
Resources
Tutorials
FAQ
Knowledge Base
Downloads
Links
AGS-related links
* AGS Manual
  * Scripting
    * Inventory item functions and properties

Graphic property (inventory)

(Formerly known as GetInvGraphic, which is now obsolete)
(Formerly known as SetInvItemPic, which is now obsolete)

int InventoryItem.Graphic
Gets/sets the sprite slot number of the inventory item. You could use this with the Object.Graphic property as a means of the player 'dropping' an inventory item, or it may be useful if you want to do a Raw Drawn inventory window.

NOTE: For backwards compatibility, if you change this property and the CursorGraphic currently has the same sprite as the main Graphic, then the CursorGraphic will be changed too.

Example:

int slot = player.ActiveInventory.Graphic;
will place the sprite number of the player's current inventory item into slot.

See Also: InventoryItem.CursorGraphic, InventoryItem.GetAtScreenXY, InventoryItem.Name


User comments and notes
There are currently no user comments on this page.
The user comment facility is currently disabled.