Skip to main content

Effect

The effect interface

Effect.reset()

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

Properties

static

Effect.static: table

Get a reference to the static effect settings

Functions

reset

Effect.reset() → ()

Removes all effects and resets the global effect state

wait

Effect.wait() → ()

Waits until all effects are complete

clear

Effect.clear(
optionstable--

settings

) → ()

Removes all effects

Options

Name Type Default Description
all bool false Clear static effects

circle

Effect.circle(
optionstable--

settings

) → EffectRef

Creates a circle effect

Options

Name Type Default Description
time number Beat Effect duration (s)
from number 0 Start value
to number 1 End value
keep bool false Never expire
static bool false Not cleared normally

corrupt

Effect.corrupt(
optionstable--

settings

) → EffectRef

Creates a corrupt effect

Options

Name Type Default Description
time number Beat Effect duration (s)
from number 1 Start value
to number 0 End value
keep bool false Never expire
static bool false Not cleared normally

flash

Effect.flash(
optionstable--

settings

) → EffectRef

Creates a flash effect

Options

Name Type Default Description
time number Beat Effect duration (s)
from number 0.2 Start value
to number 0 End value
keep bool false Never expire
static bool false Not cleared normally

hit

Effect.hit(
optionstable--

settings

) → EffectRef

Creates a hit effect

Options

Name Type Default Description
keep bool false Never expire
static bool false Not cleared normally

rumble

Effect.rumble(
optionstable--

settings

) → EffectRef

Creates a rumble effect

Options

Name Type Default Description
time number Beat Effect duration (s)
from number 1.5 Start value
to number 0 End value
keep bool false Never expire
static bool false Not cleared normally

sight

Effect.sight(
optionstable--

settings

) → EffectRef

Creates a sight effect

Options

Name Type Default Description
time number Beat Effect duration (s)
from number 0 Start value
to number 1 End value
keep bool false Never expire
static bool false Not cleared normally

storm

Effect.storm(
optionstable--

settings

) → EffectRef

Creates a storm effect

Options

Name Type Default Description
time number Beat Effect duration (s)
wind number 0.2 Wind intensity
rain number 0.1 Rain intensity
keep bool false Never expire
static bool false Not cleared normally

volume

Effect.volume(
optionstable--

settings

) → EffectRef

Creates a volume effect

Options

Name Type Default Description
time number Beat Effect duration (s)
from number 1 Start value
to number 0 End value
keep bool false Never expire
static bool false Not cleared normally

volume_music

Effect.volume_music(
optionstable--

settings

) → EffectRef

Creates a volume_music effect

Options

Name Type Default Description
time number Beat Effect duration (s)
from number 1 Start value
to number 0 End value
keep bool false Never expire
static bool false Not cleared normally

volume_sound

Effect.volume_sound(
optionstable--

settings

) → EffectRef

Creates a volume_sound effect

Options

Name Type Default Description
time number Beat Effect duration (s)
from number 1 Start value
to number 0 End value
keep bool false Never expire
static bool false Not cleared normally
Show raw api
{
    "functions": [
        {
            "name": "reset",
            "desc": "Removes all effects and resets the global effect state",
            "params": [],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 19,
                "path": "../../res/data/script/lib/system/effect.lua"
            }
        },
        {
            "name": "wait",
            "desc": "Waits until all effects are complete",
            "params": [],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 25,
                "path": "../../res/data/script/lib/system/effect.lua"
            }
        },
        {
            "name": "clear",
            "desc": "Removes all effects\n\n### Options\n| Name            | Type        | Default | Description                    |\n|-----------------|-------------|---------|--------------------------------|\n| all             | bool        |   false | Clear static effects           |",
            "params": [
                {
                    "name": "options",
                    "desc": "settings",
                    "lua_type": "table"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 44,
                "path": "../../res/data/script/lib/system/effect.lua"
            }
        },
        {
            "name": "circle",
            "desc": "Creates a circle effect\n\n### Options\n| Name            | Type        | Default | Description                    |\n|-----------------|-------------|---------|--------------------------------|\n| time            | number      |    Beat | Effect duration (s)            |\n| from            | number      |       0 | Start value                    |\n| to              | number      |       1 | End value                      |\n| keep            | bool        |   false | Never expire                   |\n| static          | bool        |   false | Not cleared normally           |",
            "params": [
                {
                    "name": "options",
                    "desc": "settings",
                    "lua_type": "table"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "EffectRef"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 62,
                "path": "../../res/data/script/lib/system/effect.lua"
            }
        },
        {
            "name": "corrupt",
            "desc": "Creates a corrupt effect\n\n### Options\n| Name            | Type        | Default | Description                    |\n|-----------------|-------------|---------|--------------------------------|\n| time            | number      |    Beat | Effect duration (s)            |\n| from            | number      |       1 | Start value                    |\n| to              | number      |       0 | End value                      |\n| keep            | bool        |   false | Never expire                   |\n| static          | bool        |   false | Not cleared normally           |",
            "params": [
                {
                    "name": "options",
                    "desc": "settings",
                    "lua_type": "table"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "EffectRef"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 81,
                "path": "../../res/data/script/lib/system/effect.lua"
            }
        },
        {
            "name": "flash",
            "desc": "Creates a flash effect\n\n### Options\n| Name            | Type        | Default | Description                    |\n|-----------------|-------------|---------|--------------------------------|\n| time            | number      |    Beat | Effect duration (s)            |\n| from            | number      |     0.2 | Start value                    |\n| to              | number      |       0 | End value                      |\n| keep            | bool        |   false | Never expire                   |\n| static          | bool        |   false | Not cleared normally           |",
            "params": [
                {
                    "name": "options",
                    "desc": "settings",
                    "lua_type": "table"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "EffectRef"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 100,
                "path": "../../res/data/script/lib/system/effect.lua"
            }
        },
        {
            "name": "hit",
            "desc": "Creates a hit effect\n\n### Options\n| Name            | Type        | Default | Description                    |\n|-----------------|-------------|---------|--------------------------------|\n| keep            | bool        |   false | Never expire                   |\n| static          | bool        |   false | Not cleared normally           |",
            "params": [
                {
                    "name": "options",
                    "desc": "settings",
                    "lua_type": "table"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "EffectRef"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 116,
                "path": "../../res/data/script/lib/system/effect.lua"
            }
        },
        {
            "name": "rumble",
            "desc": "Creates a rumble effect\n\n### Options\n| Name            | Type        | Default | Description                    |\n|-----------------|-------------|---------|--------------------------------|\n| time            | number      |    Beat | Effect duration (s)            |\n| from            | number      |     1.5 | Start value                    |\n| to              | number      |       0 | End value                      |\n| keep            | bool        |   false | Never expire                   |\n| static          | bool        |   false | Not cleared normally           |",
            "params": [
                {
                    "name": "options",
                    "desc": "settings",
                    "lua_type": "table"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "EffectRef"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 135,
                "path": "../../res/data/script/lib/system/effect.lua"
            }
        },
        {
            "name": "sight",
            "desc": "Creates a sight effect\n\n### Options\n| Name            | Type        | Default | Description                    |\n|-----------------|-------------|---------|--------------------------------|\n| time            | number      |    Beat | Effect duration (s)            |\n| from            | number      |       0 | Start value                    |\n| to              | number      |       1 | End value                      |\n| keep            | bool        |   false | Never expire                   |\n| static          | bool        |   false | Not cleared normally           |",
            "params": [
                {
                    "name": "options",
                    "desc": "settings",
                    "lua_type": "table"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "EffectRef"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 154,
                "path": "../../res/data/script/lib/system/effect.lua"
            }
        },
        {
            "name": "storm",
            "desc": "Creates a storm effect\n\n### Options\n| Name            | Type        | Default | Description                    |\n|-----------------|-------------|---------|--------------------------------|\n| time            | number      |    Beat | Effect duration (s)            |\n| wind            | number      |     0.2 | Wind intensity                 |\n| rain            | number      |     0.1 | Rain intensity                 |\n| keep            | bool        |   false | Never expire                   |\n| static          | bool        |   false | Not cleared normally           |",
            "params": [
                {
                    "name": "options",
                    "desc": "settings",
                    "lua_type": "table"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "EffectRef"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 173,
                "path": "../../res/data/script/lib/system/effect.lua"
            }
        },
        {
            "name": "volume",
            "desc": "Creates a volume effect\n\n### Options\n| Name            | Type        | Default | Description                    |\n|-----------------|-------------|---------|--------------------------------|\n| time            | number      |    Beat | Effect duration (s)            |\n| from            | number      |       1 | Start value                    |\n| to              | number      |       0 | End value                      |\n| keep            | bool        |   false | Never expire                   |\n| static          | bool        |   false | Not cleared normally           |",
            "params": [
                {
                    "name": "options",
                    "desc": "settings",
                    "lua_type": "table"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "EffectRef"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 192,
                "path": "../../res/data/script/lib/system/effect.lua"
            }
        },
        {
            "name": "volume_music",
            "desc": "Creates a volume_music effect\n\n### Options\n| Name            | Type        | Default | Description                    |\n|-----------------|-------------|---------|--------------------------------|\n| time            | number      |    Beat | Effect duration (s)            |\n| from            | number      |       1 | Start value                    |\n| to              | number      |       0 | End value                      |\n| keep            | bool        |   false | Never expire                   |\n| static          | bool        |   false | Not cleared normally           |",
            "params": [
                {
                    "name": "options",
                    "desc": "settings",
                    "lua_type": "table"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "EffectRef"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 211,
                "path": "../../res/data/script/lib/system/effect.lua"
            }
        },
        {
            "name": "volume_sound",
            "desc": "Creates a volume_sound effect\n\n### Options\n| Name            | Type        | Default | Description                    |\n|-----------------|-------------|---------|--------------------------------|\n| time            | number      |    Beat | Effect duration (s)            |\n| from            | number      |       1 | Start value                    |\n| to              | number      |       0 | End value                      |\n| keep            | bool        |   false | Never expire                   |\n| static          | bool        |   false | Not cleared normally           |",
            "params": [
                {
                    "name": "options",
                    "desc": "settings",
                    "lua_type": "table"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "EffectRef"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 230,
                "path": "../../res/data/script/lib/system/effect.lua"
            }
        }
    ],
    "properties": [
        {
            "name": "static",
            "desc": "Get a reference to the static effect settings",
            "lua_type": "table",
            "source": {
                "line": 33,
                "path": "../../res/data/script/lib/system/effect.lua"
            }
        }
    ],
    "types": [],
    "name": "Effect",
    "desc": "The effect interface\n\n```lua\nEffect.reset()\n\neffect = Effect.sight()\neffect:stop()\neffect:reverse()\n```",
    "source": {
        "line": 13,
        "path": "../../res/data/script/lib/system/effect.lua"
    }
}