Difference between revisions of "GetItemCount"

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
imported>DragoonWraith
(doing this one first)
imported>DragoonWraith
(indentation!)
Line 1: Line 1:
<!-- Begin Search Terms
<!-- Begin Search Terms
Get
Get
Item
Item
Count
Count
End Search Terms -->
End Search Terms -->
'''Syntax:'''
'''Syntax:'''

Revision as of 14:54, 25 February 2008

Syntax:

[ActorID|ContainerID.]GetItemCount ObjectID

Examples:

if (GetItemCount Gold001 <= 0)
  disable
endif
Ref MyItem
Short count

set MyItem to ArenaAkaviriLongSword
if player.GetItemCount MyItem == 0
  player.additem MyItem 1
endif

Returns the number of ObjectID in the actor's inventory. It also works for containers.

Notes

  • You can use a reference variable as ObjectID.


See Also

AddItem

RemoveItem