Skip to content

ActorCarryEntity

Has an NPC actor carry a body - a guard dragging a corpse.

The actor stands still for the grab (about three seconds - MoveActor answers false meanwhile), then carries: walk it with MoveActor and the body goes with it. ActorPutDown puts it down. The same body rules as CarryEntity; works with the players’ own grab off. No callback tells an actor’s carry - poll GetEntityCarrier. false when actorId is not a standing NPC actor, or either is busy.

ActorCarryEntity(actorId, entityId)
Parameter Type
actorId number the NPC actor that carries
entityId number the body, or the NPC actor, it carries

boolean - true when the grab started

-- the guard grabs the body (three seconds standing still), then walks it to the cell
local guard = CreateActor(nil, x, y, z, 0, "Guard")
ActorCarryEntity(guard, corpseId)
SetTimer(function() MoveActor(guard, cellX, cellY, cellZ, 1.5) end, 3500)

ActorCarryPlayer · ActorPutDown · GetEntityCarrier · the Carrying group of the index