Background for Fallout 4
Member of the ReferenceAlias script
boolfunctionForceRefIfEmpty(ObjectReferenceakNewRef)

Description

Wiki Description

Forces this alias to use the specified reference, but only if the alias is currently empty

Documentation Comment

SJML -- tries to force a reference into the alias, but only if it's already empty.
returns true if the alias now holds the passed reference, false if it was already filled.


Parameters

  1. ObjectReferenceakNewRef

    CK Wiki Description

    The ObjectReference to tell this alias to use, if empty


Examples

; Force the alias to use the random person as the reference, but only if the alias is currently empty
Alias_JohnDoe.ForceRefIfEmpty(RandomPerson)

Auto-Generated Example

ObjectReference myObjectReference__akNewRef

bool returnedValue = myReferenceAlias__toCallFunctionOn.ForceRefIfEmpty(myObjectReference__akNewRef)

Related Pages


Additional References

View this function’s page on the Fallout 4 Creation Kit Wiki

Some data provided by the Fallout 4 Creation Kit Wiki. Licensed under the Creative Commons Attribution-Share Alike 4.0 license.