MoveActor
Walks an actor to a point - around the walls when the server has the navigation mesh.
At speed metres per second, facing its way - about 1.5 walks, 4 runs, 6.5 sprints (the body’s clips follow the speed).
OnActorArrive fires when it gets there. A new target replaces the old one; a pose (SetActorAnim) is cleared. With
the level’s navigation mesh (HasNavmesh, the navigation guide) the actor takes the walk the game’s own
people would - corner by corner, around walls and through doorways; a target off the mesh (in a wall, on a roof) or a
server without the mesh gets the straight line, where the body stops at a wall and catches up when the line comes out.
Syntax
Section titled “Syntax”MoveActor(id, x, y, z [, speed])| Parameter | Type | |
|---|---|---|
id |
number | the actor |
x |
number | metres |
y |
number | metres |
z |
number | metres |
speed |
number | metres per second (1.5) (optional) |
Returns
Section titled “Returns”boolean - false for anything but a living actor
Example
Section titled “Example”MoveActor(guard, 1300, 1100, -1, 1.5) -- a walkMoveActor(runner, tx, ty, tz, 4) -- a runSee also
Section titled “See also”StopActor · TurnActor · IsActorMoving · OnActorArrive · the NPC actors group of the index
