AuxiliaryVariableSetFromArray
From GECK
A function added by the JIP NVSE Plugin.
Contents
Description
Creates an Auxiliary-Variable containing all the values stored in the passed array_var. If the specified AuxVar already exists, all values stored in it are erased.
Syntax
(numElements:int) reference.AuxiliaryVariableSetFromArray varName:string sourceArray:array_var baseForm:ref
Or:
(numElements:int) reference.AuxVarSetFromArr varName:string sourceArray:array_var baseForm:ref
Example
RaulRef.AuxiliaryVariableSetFromArray "someVarName" aSourceArr
AuxVarSetFromArr "someVarName" aSourceArr ArmorCombat
Notes
- The function returns the size (number of elements) of the created AuxVar.
- This creates a new array stored in the AuxVar that is no longer associated with the source array.
- This function only grabs the values from the array; keys from Map Arrays and StringMaps are ignored, as AuxVars only use numeric keys, like regular arrays.
- Using this function on a Multidimensional Array (an Array composed of Arrays) will NOT produce the expected results. It is suggested to only use single-dimension arrays with this function.