Skip to main content

Actors

Description

Actors are static world entities. They can play an animation and report when a player aims at them, but they do not use the movement or combat API of Server NPCs and never consume player slots.

Attributes

ActorOptions contains modelId, position, optional heading, virtualWorld, interior and optional animation { dictionary, name }.

Methods and events

  • server.actors.create(options)
  • server.actors.destroy(id)
  • server.actors.applyAnimation(id, dictionary, name)
  • server.on("actorPlayerAim", ({ id }, playerId) => ...)

The callback receives the Actor entity ID and the numeric player ID that aimed at it. The player ID is session-scoped; use the associated Player.accountId from your own server state when a persistent identity is needed.