Skip to main content

TeamKillTracker

This item only works when running on the server. Server

Counts the kills scored by one team. Bound to an IntValue parented under a Team; every death report whose killer is on that team increments the value.

Retrieve the binder from a ServiceBag with serviceBag:GetService(require("TeamKillTracker")) and create tracked values with TeamKillTrackerUtils.create.

Functions​

new​

TeamKillTracker.new(
scoreObject: IntValue,--

Parented under the Team to track

serviceBag: ServiceBag
) → TeamKillTracker

Constructs a new TeamKillTracker. Should be done via the binder.

GetTeam​

TeamKillTracker.GetTeam(self: TeamKillTracker) → Instance?

Returns the team whose kills are tracked

GetKillValue​

TeamKillTracker.GetKillValue(self: TeamKillTracker) → IntValue

Returns the value holding the kill count

GetKills​

TeamKillTracker.GetKills(self: TeamKillTracker) → number

Returns the number of kills scored by the team

ObserveKills​

TeamKillTracker.ObserveKills(self: TeamKillTracker) → Observable.Observable<number>

Observes the number of kills scored by the team

Show raw api
{
    "functions": [
        {
            "name": "new",
            "desc": "Constructs a new TeamKillTracker. Should be done via the binder.",
            "params": [
                {
                    "name": "scoreObject",
                    "desc": "Parented under the [Team] to track",
                    "lua_type": "IntValue"
                },
                {
                    "name": "serviceBag",
                    "desc": "",
                    "lua_type": "ServiceBag"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "TeamKillTracker"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 48,
                "path": "src/deathreport/src/Server/Stats/TeamKillTracker.lua"
            }
        },
        {
            "name": "GetTeam",
            "desc": "Returns the team whose kills are tracked",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "TeamKillTracker"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Instance?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 71,
                "path": "src/deathreport/src/Server/Stats/TeamKillTracker.lua"
            }
        },
        {
            "name": "GetKillValue",
            "desc": "Returns the value holding the kill count",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "TeamKillTracker"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "IntValue"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 79,
                "path": "src/deathreport/src/Server/Stats/TeamKillTracker.lua"
            }
        },
        {
            "name": "GetKills",
            "desc": "Returns the number of kills scored by the team",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "TeamKillTracker"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "number"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 87,
                "path": "src/deathreport/src/Server/Stats/TeamKillTracker.lua"
            }
        },
        {
            "name": "ObserveKills",
            "desc": "Observes the number of kills scored by the team",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "TeamKillTracker"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Observable.Observable<number>\n"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 94,
                "path": "src/deathreport/src/Server/Stats/TeamKillTracker.lua"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "TeamKillTracker",
    "desc": "Counts the kills scored by one team. Bound to an [IntValue] parented under a [Team]; every death\nreport whose killer is on that team increments the value.\n\nRetrieve the binder from a [ServiceBag] with `serviceBag:GetService(require(\"TeamKillTracker\"))`\nand create tracked values with [TeamKillTrackerUtils.create].",
    "realm": [
        "Server"
    ],
    "source": {
        "line": 12,
        "path": "src/deathreport/src/Server/Stats/TeamKillTracker.lua"
    }
}