Difference between revisions of "GetItemCount"
Jump to navigation
Jump to search
imported>Khadir (Documenting actor functions ... + wikifying) |
imported>Vswe m (Added Search Terms) |
||
(6 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
<!-- Begin Search Terms | |||
Get | |||
Item | |||
Count | |||
End Search Terms --> | |||
'''Syntax:''' | '''Syntax:''' | ||
[''ActorID''|''ContainerID''.]GetItemCount ''ObjectID'' | [''ActorID''|''ContainerID''.]GetItemCount ''ObjectID'' | ||
Line 29: | Line 33: | ||
[[Category: Functions]] | [[Category: Functions]] | ||
[[Category: | [[Category:Functions (CS)]] | ||
[[Category: Functions (CS 1.0)]] | |||
[[Category:Actor Functions]] | |||
[[Category:Actor Functions (CS 1.0)]] | |||
[[Category: Condition Functions]] | [[Category: Condition Functions]] | ||
[[Category: Condition Functions (CS 1.0)]] | |||
[[Category: Inventory Functions]] | |||
[[Category: Inventory Functions (CS 1.0)]] | |||
<!-- Begin Search Terms | |||
Get | |||
Item | |||
Count | |||
End Search Terms --> |
Latest revision as of 09:05, 20 June 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[edit | edit source]
- You can use a reference variable as ObjectID.
See Also[edit | edit source]