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(
options: table--

settings

) → ()

Removes all effects

Options

Name Type Default Description
all bool false Clear static effects

circle​

Effect.circle(
options: table--

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(
options: table--

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
center_x number - Center horizontal coordinate
center_y number - Center vertical coordinate

flash​

Effect.flash(
options: table--

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(
options: table--

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(
options: table--

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(
options: table--

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(
options: table--

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(
options: table--

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(
options: table--

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(
options: table--

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           |\n| center_x        | number      |       - | Center horizontal coordinate   |\n| center_y        | number      |       - | Center vertical coordinate   |",
            "params": [
                {
                    "name": "options",
                    "desc": "settings",
                    "lua_type": "table"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "EffectRef"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 83,
                "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": 102,
                "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": 118,
                "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": 137,
                "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": 156,
                "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": 175,
                "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": 194,
                "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": 213,
                "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": 232,
                "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"
    }
}