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.
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 |
position |
string
|
name of the position |
itemId |
string
|
# static moveTo(to_location_id)
moves this actor to a new location
Parameters:
| Name | Type | Description |
|---|---|---|
to_location_id |
string
|