Link to TES4 Construction Set Wiki: MoveTo.
A function included in the GECK version 188.8.131.52.
Moves the object to the specified reference's location with optional axis offset parameters.
[Object].MoveTo MarkerID:ref OffsetX:float OffsetY:float OffsetZ:float
BuddyRef.MoveTo HiddenCaveMarker BuddyRef.MoveTo Player 512 0 0
- MoveTo can trigger the OnLoad block of the moving object, as it seems to essentially reload the object out of then into memory again.
- MoveTo is an excellent way to move an object from one cell to another.
- Consider using SetPos if MoveTo doesn't do the trick.
- If this function is used to move the player, the function will queue up a movement request which will NOT process immediately and will NOT halt script execution.
- Using this function to move a object to a ragdoll may not give the right results. If a ragdoll is on a table or other high places the object ref will be teleported to the floor beneath the object and will end up clipping through the object the ragdoll rests on. The reason for this seems to be that a ragdolls coordinates are always on the floor.
- Moving a actor with this function may not give expected results. Actors will always appear on the Navmesh and generally cannot be moved to a position where a navmesh does not exist with this function, like for example on top of furniture or on the roofs of most buildings. Although if an actor has the Immobile flag set in the animation tab the function can move them anywhere specified.
- This function works as expected for Actors. For most other object types, like containers and activators, the object's coordinates are updated but its world art is not. Additional scripting may be necessary to ensure the object moves properly:
myObject.Disable myObject.MoveTo myMarker myObject.Enable set xPos to myObject.GetPos X myObject.SetPos X xPos
- Furniture markers must be persistent in order to move actors to them directly.