Background for Starfield
Member of the ObjectReference script
boolfunctionMoveToIfUnloaded(ObjectReferenceakTarget, floatafXOffset=0.0, floatafYOffset=0.0, floatafZOffset=0.0)

Description

Wiki Description

Moves this reference to the location of the target reference, with the specified offset, if this reference is currently unloaded (has no 3D). If it is loaded, it does nothing.

Documentation String

Calls MoveTo if the calling ObjectReference is currently unloaded. Doesn't do anything if it IS loaded. No waiting or while loops. Returns true if it does the moveto

Documentation Comment

kkuhlmann:


Parameters

  1. ObjectReferenceakTarget

    CK Wiki Description

    The target reference to move this one to.

  2. floatafXOffset=0.0

    CK Wiki Description

    How much to offset the move in the X direction.

  3. floatafYOffset=0.0

    CK Wiki Description

    How much to offset the move in the Y direction.

  4. floatafZOffset=0.0

    CK Wiki Description

    How much to offset the move in the Z direction.


Examples

; Move the box to the shelf, but only if it is unloaded
if Box.MoveToIfUnloaded(Shelf)
  Debug.Trace("Moved the box")
endIf
; Move the box above the shelf, but only if it is unloaded
if Box.MoveToIfUnloaded(Shelf, 0.0, 0.0, 1.0)
  Debug.Trace("Moved the box above the shelf")
endIf

Auto-Generated Example

ObjectReference myObjectReference__akTarget
float myFloat__afXOffset
float myFloat__afYOffset
float myFloat__afZOffset

bool returnedValue = myObjectReference__toCallFunctionOn.MoveToIfUnloaded(myObjectReference__akTarget, myFloat__afXOffset, myFloat__afYOffset, myFloat__afZOffset)

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.