Difference between revisions of "GetItemCount"
Jump to navigation
Jump to search
imported>Khadir (Documenting actor functions ... + wikifying) |
imported>JOG |
||
Line 1: | Line 1: | ||
'''Syntax:''' | '''Syntax:''' | ||
[''ActorID''|''ContainerID''.]GetItemCount ''ObjectID'' | [''ActorID''|''ContainerID''.]GetItemCount ''ObjectID'' | ||
Line 31: | Line 30: | ||
[[Category: Object Functions]] | [[Category: Object Functions]] | ||
[[Category: Condition Functions]] | [[Category: Condition Functions]] | ||
[[Category:Actor Functions]] |
Revision as of 10:25, 28 June 2006
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.