845 B
845 B
Function: MoveToLocation(spawn, x, y, z, speed, lua_function, more_points, use_nav_path)
Description: Tells NPC to move to the location specified in the x,y,z.
Parameters:
spawn
(Spawn) - Spawn object representingspawn
.x
(int32) - Integer valuex
.y
(int32) - Integer valuey
.z
(int32) - Integer valuez
.speed
(int32) - Integer valuespeed
.lua_function
(int32) - Integer valuelua_function
.more_points
(int32) - Integer valuemore_points
.use_nav_path
(int32) - Integer valueuse_nav_path
.
Returns: None.
Example:
-- From SpawnScripts/BeggarsCourt/aBrotherhoodenforcer.lua
function spawn(NPC)
if GetSpawnLocationID(NPC) == 403031 then
MoveToLocation(NPC, -14.62, 2.25, -6.99, 3, "", true)
MoveToLocation(NPC, -17.68, 3.00, -21.58, 3, "", false)
end