Skip to main content

EffectRef

effect = Effect.sight()
effect:stop()
effect:reverse()

Properties

complete

EffectRef.complete: bool

Get/Set the complete status of the effect

remaining

EffectRef.remaining: number

Get/Set the remaining time of the effect

duration

EffectRef.duration: number

Get/Set the duration of the effect

elapsed

EffectRef.elapsed: number

Get/Set the elapsed time of the effect

Functions

stop

EffectRef.stop() → ()

Stops the effect

wait

EffectRef.wait() → ()

Wait until the effect is complete

reverse

EffectRef.reverse(
durationnumber | nil--

optional new effect duration

) → ()

Reverses the effect and starts if necessary

Show raw api
{
    "functions": [
        {
            "name": "stop",
            "desc": "Stops the effect",
            "params": [],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 16,
                "path": "../../res/data/script/lib/system/effect_ref.lua"
            }
        },
        {
            "name": "wait",
            "desc": "Wait until the effect is complete",
            "params": [],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 22,
                "path": "../../res/data/script/lib/system/effect_ref.lua"
            }
        },
        {
            "name": "reverse",
            "desc": "Reverses the effect and starts if necessary",
            "params": [
                {
                    "name": "duration",
                    "desc": "optional new effect duration",
                    "lua_type": "number | nil"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 29,
                "path": "../../res/data/script/lib/system/effect_ref.lua"
            }
        }
    ],
    "properties": [
        {
            "name": "complete",
            "desc": "Get/Set the complete status of the effect",
            "lua_type": "bool",
            "source": {
                "line": 38,
                "path": "../../res/data/script/lib/system/effect_ref.lua"
            }
        },
        {
            "name": "remaining",
            "desc": "Get/Set the remaining time of the effect",
            "lua_type": "number",
            "source": {
                "line": 45,
                "path": "../../res/data/script/lib/system/effect_ref.lua"
            }
        },
        {
            "name": "duration",
            "desc": "Get/Set the duration of the effect",
            "lua_type": "number",
            "source": {
                "line": 52,
                "path": "../../res/data/script/lib/system/effect_ref.lua"
            }
        },
        {
            "name": "elapsed",
            "desc": "Get/Set the elapsed time of the effect",
            "lua_type": "number",
            "source": {
                "line": 59,
                "path": "../../res/data/script/lib/system/effect_ref.lua"
            }
        }
    ],
    "types": [],
    "name": "EffectRef",
    "desc": "```lua\neffect = Effect.sight()\neffect:stop()\neffect:reverse()\n```",
    "source": {
        "line": 10,
        "path": "../../res/data/script/lib/system/effect_ref.lua"
    }
}