Difference between revisions of "MoveTo"
Jump to navigation
Jump to search
imported>DZastreux m (→Notes) |
imported>DZastreux (→Notes) |
||
Line 25: | Line 25: | ||
myObject.setPos x xp | myObject.setPos x xp | ||
* | * This trick above won't work with furnitures : It seems moveTo can't be used at all with any furnitures objects. | ||
<!-- | <!-- |
Revision as of 19:14, 9 March 2009
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
- This trick above won't work with furnitures : It seems moveTo can't be used at all with any furnitures objects.