MoveTo - ObjectReference
Revision as of 20:34, 20 October 2016 by imported>Kalevala (→Notes)
Member of: ObjectReference Script
Moves this reference to the location of the target reference, with the specified offset.
Syntax
Function MoveTo(ObjectReference akTarget, float afXOffset = 0.0,
float afYOffset = 0.0, float afZOffset = 0.0, bool abMatchRotation = true) native
Parameters
- akTarget: The target reference to move this one to.
- Note: This can accept non-persistent references in containers. In which case the object is moved to the container's location (and not into the container).
- afXOffset: How much to offset the move in the X direction.
- Default: 0.0
- afYOffset: How much to offset the move in the Y direction.
- Default: 0.0
- afZOffset: How much to offset the move in the Z direction.
- Default: 0.0
- abMatchRotation: Whether the moved object should match the rotation of the target object or not
- Default: True
Return Value
None.
Examples
; Move Bob to his house, designated by a marker
Bob.MoveTo(BobsHouseMarker)
; Move Bob to his house, but don't match the rotation of the marker
Bob.MoveTo(BobsHouseMarker, abMatchRotation = false)
Notes
- Calling a MoveTo on the Player will cause the game to fade-out and fade-in automatically.
- If we are moving the Player, and the distance between the MoveTo target and the Player is very small, we don't call for the automatic fade-out. There's a [General] INI setting called fMinPlayerMoveToDistForLoadScreen which defines the minimum distance to call for a loadscreen.
- Using MoveTo, or any of the other Move function, on a Static can cause flickering on the model edges and blurring of the texture. To combat this, immediately call a disable() then enable() on the model to force it to reload in the new position.
- This can cause the pip-boy model to display incorrectly when MoveTo is called on the player.Source