GetNumStackedItems(object)
Determines the number of stacked items contained within an inventory object.
int GetNumStackedItems( object oItem );
Parameters
oItem
The inventory item to find how many are of which are stacked.
Description
Returns the number of stacked items that are comprised of the inventory object, oItem.
Version
1.22
Example
// Demonstrates how to check an NPC's arrow supply and yield speach when it is depleted. void main() { //retrieves NPC's arrow object object arrows = GetObjectByTag("MY_ARROWS"); if(GetNumStackedItems(arrows)==0) { ActionSpeakString("My arrow supply is depleted!"); } }
See Also
functions: | GetNumItems |
categories: | Inventory Functions |
author: Sarev0k, editor: Tom Cassiotis
Send comments on this topic.