Attention: Here be dragons

This is the latest (unstable) version of this documentation, which may document features not available in or compatible with released stable versions.

MatchπŸ”—

Inherits: Node

There is currently no description for this class. Please help us by contributing one !

PropertiesπŸ”—

MatchState

state

0

Array [Mode]

modes

_populate_modes()

Mode

mode

Map

map

Teams

teams

<unknown>

Timer

timer

<unknown>

Scoreboard

scoreboard

<unknown>

MultiplayerSpawner

map_spawner

<unknown>

MultiplayerSpawner

player_spawner

<unknown>

MultiplayerSpawner

objective_spawner

<unknown>

Dictionary [int, Player]

players

{}

Dictionary [int, Dictionary]

spawn_acks

{}

MethodenπŸ”—

void

set_state(new_state: MatchState)

Match

instantiate() static

Array [Mode]

_populate_modes() static

void

_ready()

void

setup(map_id: int, p_mode: int)

Player

_on_player_spawn(data: Variant = null)

Map

_on_map_spawn(data: Variant = null)

void

join(username: String)

Vector3

get_spawn_position(peer_id: int)

void

start()

void

end()

void

pause()

void

_on_peer_disconnected(peer_id: int)

void

_on_state_changed(new_state: MatchState)

void

_on_warmup_timeout()

void

_on_match_timeout()

void

_spawn_ack(peer_id: int)

void

_spawn_unfreeze(peer_id: int)

void

switch_team(peer_id: int, to_team_name: String)

void

_on_team_added(team_name: String)

void

_on_team_erased(team_name: String)

void

_on_team_player_added(team_name: String, peer_id: int, username: String = "newblood")

void

_on_team_player_erased(team_name: String, peer_id: int)


SignalsπŸ”—

state_changed(new_state: MatchState) πŸ”—

Emitted after state is changed


EnumerationsπŸ”—

enum MatchState: πŸ”—

MatchState READY = 0

The match is ready to begin.

MatchState WARMUP = 1

A brief training session to prepare before it starts.

MatchState RUNNING = 2

The match is running as specified by a Ruleset.

MatchState PAUSED = 3

The match is paused (ex. a majority of players voted a pause).

MatchState ENDED = 4

The match has ended.


ConstantsπŸ”—

scene = <Object> πŸ”—

There is currently no description for this constant. Please help us by contributing one!


EigenschaftsbeschreibungenπŸ”—

MatchState state = 0 πŸ”—

The current state of this Match


Array [Mode] modes = _populate_modes() πŸ”—

Statically initialized array of available Mode


Mode mode πŸ”—

The current Mode responsible for this Match behavior


Map map πŸ”—

The current Map used to dispute this Match


Teams teams = <unknown> πŸ”—

The Teams manager


Timer timer = <unknown> πŸ”—

The match timer for map state rotation


Scoreboard scoreboard = <unknown> πŸ”—

The Scoreboard to keep track of peer scores


MultiplayerSpawner map_spawner = <unknown> πŸ”—

There is currently no description for this property. Please help us by contributing one!


MultiplayerSpawner player_spawner = <unknown> πŸ”—

There is currently no description for this property. Please help us by contributing one!


MultiplayerSpawner objective_spawner = <unknown> πŸ”—

There is currently no description for this property. Please help us by contributing one!


Dictionary [int, Player] players = {} πŸ”—

The Player.peer_id to Player instance map (set registered on spawn)


Dictionary [int, Dictionary] spawn_acks = {} πŸ”—

The dictionary maintained by the server to track peer readyness on spawn so that the server can tell everyone to start local prediction


MethodenbeschreibungenπŸ”—

void set_state(new_state: MatchState) πŸ”—

There is currently no description for this method. Please help us by contributing one!


Match instantiate() static πŸ”—

There is currently no description for this method. Please help us by contributing one!


Array [Mode] _populate_modes() static πŸ”—

This method loads available match modes when the game is initialized


void _ready() πŸ”—

There is currently no description for this method. Please help us by contributing one!


void setup(map_id: int, p_mode: int) πŸ”—

Starts the match as specified by p_map and p_mode


Player _on_player_spawn(data: Variant = null) πŸ”—

This method runs authority and client peers when a Player is spawned by player_spawner


Map _on_map_spawn(data: Variant = null) πŸ”—

There is currently no description for this method. Please help us by contributing one!


void join(username: String) πŸ”—

Called by client peers to request the server to spawn a new player in the Match scene.


Vector3 get_spawn_position(peer_id: int) πŸ”—

There is currently no description for this method. Please help us by contributing one!


void start() πŸ”—

There is currently no description for this method. Please help us by contributing one!


void end() πŸ”—

Stops the Match


void pause() πŸ”—

Pause the Match (ex. when most peers voted for a pause)


void _on_peer_disconnected(peer_id: int) πŸ”—

There is currently no description for this method. Please help us by contributing one!


void _on_state_changed(new_state: MatchState) πŸ”—

Emitted on the server when the state changes


void _on_warmup_timeout() πŸ”—

There is currently no description for this method. Please help us by contributing one!


void _on_match_timeout() πŸ”—

There is currently no description for this method. Please help us by contributing one!


void _spawn_ack(peer_id: int) πŸ”—

This is called by players when they spawn to ack it to the server. When all peers have sent an ack then server send a global _spawn_unfreeze rpc


void _spawn_unfreeze(peer_id: int) πŸ”—

This method is called by the match authority when all peers have recognized a new player's node spawn. See the _spawn_ack rpc and spawn_acks.


void switch_team(peer_id: int, to_team_name: String) πŸ”—

This method switch a peer_id to the specified team along with its score.


void _on_team_added(team_name: String) πŸ”—

This method is called when the Teams.team_addded signal is emitted.


void _on_team_erased(team_name: String) πŸ”—

There is currently no description for this method. Please help us by contributing one!


void _on_team_player_added(team_name: String, peer_id: int, username: String = "newblood") πŸ”—

This method is called when the Team.player_added signal is emitted.


void _on_team_player_erased(team_name: String, peer_id: int) πŸ”—

This method is called when the Teams.Team signal is emitted.