Skip to content

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.

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)

boolean - false for anything but a living actor

MoveActor(guard, 1300, 1100, -1, 1.5) -- a walk
MoveActor(runner, tx, ty, tz, 4) -- a run

StopActor · TurnActor · IsActorMoving · OnActorArrive · the NPC actors group of the index