GetBaseItems

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
< [[::Category:Functions|Category:Functions]]

A function added by the Oblivion Script Extender.

Syntax:

(items:Array) reference.GetBaseItems baseContainer:ref

Returns an Array of StringMaps containing the items present in a base container or actor inventory and the quantity of each. These are the items added to the base object in the editor and may include leveled items. Some, all, or none of the items may be present in the inventory of a specific reference to the base object.


Each element of the returned Array is a StringMap with two elements:

"item"  : ref ; the item
"count" : short ; the quantity of this item

Values are accessed like:

array_var baseItems
let baseItems := someChestRef.GetBaseItems
Print "First item: " + (GetName baseItems[0][item] + " Quanitity: " + ToString baseItems[0][count]