MoveTo
Revision as of 15:06, 26 November 2008 by imported>Kkuhlmann
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