SlashCo Wiki

Player:EffectFunction

 any Player:EffectFunction( string effectName, string funcName, any ... )

Description

Calls the given callback function (e.g. EFFECT.OnApplied, EFFECT.OnExpired, EFFECT.OnRemoved) of one of the player's active effects, forwarding any extra arguments.
Does nothing if the player doesn't have that effect active, or the effect doesn't define the callback.

Arguments

1string effectName

Name of the active effect.

2string funcName

Name of the callback function to call on the effect table.

3any ...

Additional arguments passed to the callback.

Returns

1any ...

The return values of the called callback.