Class

RezEffect

RezEffect()

Constructor

# new RezEffect()

Represents an effect in the Rez game engine. Effects are typically applied to or removed from objects when items are equipped, consumed, or used. They can modify object attributes, add temporary abilities, or trigger events.

View Source rez_effect.js, line 5

Extends

Methods

# static apply(ownerId, slotId, itemId) → {*}

Applies this effect to the specified object by running the apply event handler

Parameters:
Name Type Description
ownerId string

ID of the object this effect is being applied to

slotId string

ID of the inventory slot where the item is located

itemId string

ID of the item that has this effect

View Source rez_effect.js, line 25

result of the apply event handler

*

# static constructor(id, attributes)

Creates a new effect instance

Parameters:
Name Type Description
id string

unique identifier for this effect

attributes object

effect attributes from Rez compilation

View Source rez_effect.js, line 14

# static remove(ownerId, slotId, itemId) → {*}

Removes this effect from the specified object by running the remove event handler

Parameters:
Name Type Description
ownerId string

ID of the object this effect is being removed from

slotId string

ID of the inventory slot where the item is located

itemId string

ID of the item that has this effect

View Source rez_effect.js, line 38

result of the remove event handler

*