Class

RezActor

RezActor()

Constructor

# new RezActor()

Represents an actor in the Rez game engine. Actors are game entities that can hold inventories, check items, and participate in game events.

View Source rez_actor.js, line 5

Extends

Methods

# static checkItem(inventoryId, slotId, position, itemId) → {RezDecision}

When an item is about to be added to a position of an inventory this actor owns, runs the actor's on_accept_item event handler so the actor can refuse it.

The params passed to the event handler are:

  • decision
  • inventory_id
  • slot_id
  • position
  • item_id

The decision defaults to yes. Call params.decision.no(reason) to refuse.

Parameters:
Name Type Description
inventoryId string

id of an inventory this actor owns

slotId string

id of the @slot the position uses

position string

name of the position

itemId string

View Source rez_actor.js, line 17

RezDecision

# static elementInitializer()

initializes properties of RezActor

View Source rez_actor.js, line 53

# static moveTo(to_location_id)

moves this actor to a new location

Parameters:
Name Type Description
to_location_id string

View Source rez_actor.js, line 64