Skip to main content

checkpoint_utils

utility

this module contains checkpoint utils that are used by the death manager.

Types

checkpoint_data

interface checkpoint_data {
effectstring--

the name of the effect.

changenumber--

the amount of change the effect will apply.

lifetimenumber--

the time, in seconds, the effect will last.

startnumber--

the timestamp of when the most recent time the effect was applied.

}

represents an active effect that the player has.

Functions

on_death

checkpoint_utils.on_death(
playerPlayer--

the player that died.

) → ()

run the death event for the player specified.

set

checkpoint_utils.set(
playerPlayer,--

the player that died.

pillarpillar,--

the pillar that the checkpoint is in.

idstring,--

the id of the checkpoint.

positionCFrame--

the position of the checkpoint.

) → ()

run the death event for the player specified.

get

checkpoint_utils.get(
playerPlayer--

the player that died.

) → checkpoint_data?--

the checkpoint data for the player, or nil if none exists.

get the checkpoint for the player specified.

clear

checkpoint_utils.clear(
playerPlayer--

the player that died.

) → ()

remove the checkpoint for the player specified.

Show raw api
{
    "functions": [
        {
            "name": "on_death",
            "desc": "run the death event for the player specified.",
            "params": [
                {
                    "name": "player",
                    "desc": "the player that died.",
                    "lua_type": "Player"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 45,
                "path": "src/shared/utils/checkpoints.luau"
            }
        },
        {
            "name": "set",
            "desc": "run the death event for the player specified.",
            "params": [
                {
                    "name": "player",
                    "desc": "the player that died.",
                    "lua_type": "Player"
                },
                {
                    "name": "pillar",
                    "desc": "the pillar that the checkpoint is in.",
                    "lua_type": "pillar"
                },
                {
                    "name": "id",
                    "desc": "the id of the checkpoint.",
                    "lua_type": "string"
                },
                {
                    "name": "position",
                    "desc": "the position of the checkpoint.",
                    "lua_type": "CFrame"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 83,
                "path": "src/shared/utils/checkpoints.luau"
            }
        },
        {
            "name": "get",
            "desc": "get the checkpoint for the player specified.",
            "params": [
                {
                    "name": "player",
                    "desc": "the player that died.",
                    "lua_type": "Player"
                }
            ],
            "returns": [
                {
                    "desc": "the checkpoint data for the player, or nil if none exists.",
                    "lua_type": "checkpoint_data?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 100,
                "path": "src/shared/utils/checkpoints.luau"
            }
        },
        {
            "name": "clear",
            "desc": "remove the checkpoint for the player specified.",
            "params": [
                {
                    "name": "player",
                    "desc": "the player that died.",
                    "lua_type": "Player"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 112,
                "path": "src/shared/utils/checkpoints.luau"
            }
        }
    ],
    "properties": [],
    "types": [
        {
            "name": "checkpoint_data",
            "desc": "represents an active effect that the player has.",
            "fields": [
                {
                    "name": "effect",
                    "lua_type": "string",
                    "desc": "the name of the effect."
                },
                {
                    "name": "change",
                    "lua_type": "number",
                    "desc": "the amount of change the effect will apply."
                },
                {
                    "name": "lifetime",
                    "lua_type": "number",
                    "desc": "the time, in seconds, the effect will last."
                },
                {
                    "name": "start",
                    "lua_type": "number",
                    "desc": "the timestamp of when the most recent time the effect was applied."
                }
            ],
            "source": {
                "line": 22,
                "path": "src/shared/utils/checkpoints.luau"
            }
        }
    ],
    "name": "checkpoint_utils",
    "desc": "this module contains *checkpoint utils* that are used by the *death manager*.",
    "tags": [
        "utility"
    ],
    "source": {
        "line": 34,
        "path": "src/shared/utils/checkpoints.luau"
    }
}