Skip to main content

QuestFX

The template class for all quest effects. Quest effects are created by the server and replicated to the client.

Functions

new

QuestFX.new(UsedByCharacterModel) → ()

Creates a new QuestFX instance.

Start

QuestFX:Start() → ()

Called when the quest is initialized. Any setup should be done here.

Errors

TypeDescription
"Attempted to yield inside Start function!"Thrown if the function yields.

Run

QuestFX:Run(
RunContext"Server" | "Client",
InputState"Begin" | "End"
) → ()

Called when the quest owner does an action. Can be called either from the client or the server. InputState determines whether the action is being started or ended.

Cancel

QuestFX:Cancel() → ()

Called when the quest is about to be destroyed. Any cleanup should be done here.

Show raw api
{
    "functions": [
        {
            "name": "Start",
            "desc": "Called when the quest is initialized. Any setup should be done here.",
            "params": [],
            "returns": [],
            "function_type": "method",
            "errors": [
                {
                    "lua_type": "\"Attempted to yield inside Start function!\"",
                    "desc": "Thrown if the function yields."
                }
            ],
            "source": {
                "line": 39,
                "path": "src/ReplicatedStorage/Modules/Quests/QuestFX/Client_QuestTemplate.lua"
            }
        },
        {
            "name": "Run",
            "desc": "Called when the quest owner does an action. Can be called either from the client or the server. `InputState` determines whether the action is being started or ended.",
            "params": [
                {
                    "name": "RunContext",
                    "desc": "",
                    "lua_type": "\"Server\" | \"Client\""
                },
                {
                    "name": "InputState",
                    "desc": "",
                    "lua_type": "\"Begin\" | \"End\""
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 45,
                "path": "src/ReplicatedStorage/Modules/Quests/QuestFX/Client_QuestTemplate.lua"
            }
        },
        {
            "name": "Cancel",
            "desc": "Called when the quest is about to be destroyed. Any cleanup should be done here.",
            "params": [],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 48,
                "path": "src/ReplicatedStorage/Modules/Quests/QuestFX/Client_QuestTemplate.lua"
            }
        },
        {
            "name": "new",
            "desc": "Creates a new `QuestFX` instance.",
            "params": [
                {
                    "name": "UsedByCharacter",
                    "desc": "",
                    "lua_type": "Model"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 53,
                "path": "src/ReplicatedStorage/Modules/Quests/QuestFX/Client_QuestTemplate.lua"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "QuestFX",
    "desc": "The template class for all quest effects. Quest effects are created by the server and replicated to the client.",
    "source": {
        "line": 32,
        "path": "src/ReplicatedStorage/Modules/Quests/QuestFX/Client_QuestTemplate.lua"
    }
}