Skip to main content

ScoredActionServiceClient

This item only works when running on the client. Client

Scores actions and picks the highest rated one every frame.

Functions

Init

ScoredActionServiceClient:Init(serviceBagServiceBag) → ()

Initializes the ScoredActionServiceClient. Should be done via ServiceBag.

Start

ScoredActionServiceClient:Start() → ()

Starts the scored action service. Should be done via ServiceBag.

GetScoredAction

ScoredActionServiceClient:GetScoredAction(inputKeyMapListInputKeyMapList) → ScoredAction

Gets a new scored action to use

ObserveNewFromInputKeyMapList

ScoredActionServiceClient:ObserveNewFromInputKeyMapList(scoreValueNumberValue) → (sourceObservable<InputKeyMapList>) → Observable<ScoredAction>

Observes a new scored action from a scoring value.

warning

This MUTATES state of the scored action service whenever an object is emitted.

Show raw api
{
    "functions": [
        {
            "name": "Init",
            "desc": "Initializes the ScoredActionServiceClient. Should be done via [ServiceBag].",
            "params": [
                {
                    "name": "serviceBag",
                    "desc": "",
                    "lua_type": "ServiceBag"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 27,
                "path": "src/scoredactionservice/src/Client/ScoredActionServiceClient.lua"
            }
        },
        {
            "name": "Start",
            "desc": "Starts the scored action service. Should be done via [ServiceBag].",
            "params": [],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 42,
                "path": "src/scoredactionservice/src/Client/ScoredActionServiceClient.lua"
            }
        },
        {
            "name": "GetScoredAction",
            "desc": "Gets a new scored action to use",
            "params": [
                {
                    "name": "inputKeyMapList",
                    "desc": "",
                    "lua_type": "InputKeyMapList"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "ScoredAction"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 55,
                "path": "src/scoredactionservice/src/Client/ScoredActionServiceClient.lua"
            }
        },
        {
            "name": "ObserveNewFromInputKeyMapList",
            "desc": "Observes a new scored action from a scoring value.\n\n:::warning\nThis MUTATES state of the scored action service whenever an object is emitted.\n:::",
            "params": [
                {
                    "name": "scoreValue",
                    "desc": "",
                    "lua_type": "NumberValue"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "(source: Observable<InputKeyMapList>) -> Observable<ScoredAction>"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 100,
                "path": "src/scoredactionservice/src/Client/ScoredActionServiceClient.lua"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "ScoredActionServiceClient",
    "desc": "Scores actions and picks the highest rated one every frame.",
    "realm": [
        "Client"
    ],
    "source": {
        "line": 7,
        "path": "src/scoredactionservice/src/Client/ScoredActionServiceClient.lua"
    }
}