Difference between revisions of "MoveTo"
Jump to navigation
Jump to search
Added a note
imported>DragoonWraith (→Notes) |
imported>QQuix (Added a note) |
||
Line 15: | Line 15: | ||
* '''MoveTo''' and '''PositionCell''' perform the same function, but use different parameters ('''PositionCell''' uses coordinates while '''MoveTo''' uses a reference). | * '''MoveTo''' and '''PositionCell''' perform the same function, but use different parameters ('''PositionCell''' uses coordinates while '''MoveTo''' uses a reference). | ||
* If this function is used to move the player, it will also act as a [[Return]] function -- no following lines of the script will be processed. | * If this function is used to move the player, it will also act as a [[Return]] function -- no following lines of the script will be processed. | ||
:*One way to prevent this is creating a Function with just the MoveTo. the function script will stop after the MoveTo, but the calling script will continue. | |||
::Example: | |||
... | |||
PlayerRef.call MyMoveTo AnvilFocsleMarker | |||
... | |||
---------- | |||
scn MyMoveTo | |||
ref refTarget | |||
begin Function {refTarget} | |||
MoveTo refTarget | |||
end | |||
* 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: | * 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: | ||
<pre>myObject.disable | <pre>myObject.disable |