MoveTo

From the Fallout3 GECK Wiki
Revision as of 19:56, 9 March 2009 by imported>DZastreux (→‎Notes)
Jump to navigation Jump to search

Description

MoveTo Moves the object to the specified reference's location. The x, y, z are optional offsets from the target reference.

Syntax

[ObjectRef].MoveTo MarkerID, x, y, z (optional) 

Examples

BuddyRef.MoveTo HiddenCaveMarker

This will move Buddy to the hidden cave marker

BuddyRef.MoveTo player, 512, 0, 0 

This will move Buddy to the player, slightly offset from the target

Notes

  • If this function is used to move the player, the function will queue up a movement request for him/her which s/he then will process later instead of immediately stopping script execution.
  • 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 [location]
myObject.enable
set xp to myObject.getPos x
myObject.setPos x xp
  • The trick above might not work at all with furnitures.