ForceRefIfEmpty - ReferenceAlias
Revision as of 16:20, 29 June 2013 by imported>Thingy Person
Member of: ReferenceAlias Script
Forces this alias to use the specified reference, but only if the alias is currently empty
Syntax[edit | edit source]
bool Function ForceRefIfEmpty(ObjectReference akNewRef)
if (GetReference())
return False
else
ForceRefTo(akNewRef)
return True
endif
EndFunction
Parameters[edit | edit source]
- akNewRef: The ObjectReference to tell this alias to use, if empty
Return Value[edit | edit source]
True if the alias now holds the passed reference, false if it was already filled.
Examples[edit | edit source]
; Force the alias to use the random person as the reference, but only if the alias is currently empty
Alias_JohnDoe.ForceRefIfEmpty(RandomPerson)