Scripting/Server/Classes/Object/MoveTo

Slides the object to a position.

Syntax

object.MoveTo(position, speed)

Arguments

Example

function onPlayerCommand( player, cmd, params )
{
	if ( cmd == "moveto" )
	{
		local obj = CreateObject( 1362, player.Pos );
		obj.MoveTo( player.Pos, 5.0 );
	}
}

This sample was generated from the signature – adapt the values to your gamemode.

Section: Object

Categories: Server methods | Object