FindInReferenceAliasArray - CommonArrayFunctions

From the Fallout4 CreationKit Wiki
Jump to navigation Jump to search

Member of: CommonArrayFunctions Script

Finds the reference in the alias array and returns the index (or < 0 if not found)

Syntax[edit | edit source]

int Function FindInReferenceAliasArray(ObjectReference ObjectToCheck, ReferenceAlias[] ArrayToCheck) global

Parameters[edit | edit source]

  • ObjectToCheck: The reference to look for
  • ArrayToCheck: The aliases to look in

Return Value[edit | edit source]

  • Index of the alias containing the object.
  • < 0 if the object was none, the array was none, the array was empty, or the object wasn't found.

Examples[edit | edit source]

int index = CommonArrayFunctions.FindInReferenceAliasArray(Dogmeat, SettlerAliases)
if index >= 0
  SettlerAliases[index].ForceRefTo(None) ; Pop dogmeat out of the alias
endIf

See Also[edit | edit source]