GetItemCount

From GECK
Jump to: navigation, search


A function included in the GECK for Fallout 3.

Description

Returns the amount of ObjectID in the container\actor\creature.

Syntax

[help]
(count:int) reference.GetItemCount item:form

Example

Player.GetItemCount Caps001

Example

 If Player.GetItemCount Caps001 == 0
   Player.AddItem Caps001 100
 EndIf

Notes

  • You can use a reference variable as ObjectID.
  • You can use a FormList as the item parameter -- in this case, the function returns the sum of the counts for all items in the list.
  • Does not work with Notes. Use GetHasNote to check if the Player has a specific note.

Bugs

  • Sometimes returns a non 0 value for items that are not in fact in the container because of items added via leveled lists. Fixed in JIP LN 55.41.

See Also