Multiplayer🔗

Inherits: Node

This class defines the multiplayer game type.

Properties🔗

Match

match

Teams

teams

MotionService

motion_service

Scoreboard

scoreboard

float

VICTIM_RESPAWN_TIME

3.0

int

MATCH_DURATION

1200

int

WARMUP_START_DURATION

25

PackedScene

_PLAYER

PackedScene

_FLAG

Node

players

<unknown>

Node

objectives

<unknown>

MultiplayerSpawner

player_spawner

<unknown>

MultiplayerSpawner

map_spawner

<unknown>

MultiplayerSpawner

objectives_spawner

<unknown>

Methods🔗

void

_enter_tree()

void

_ready()

Player

_on_player_spawn(data: Dictionary)

Map

_on_map_spawn(data: Variant = null)

void

_unhandled_input(event: InputEvent)

bool

is_peer_connected()

void

start_server(port: int, _p_mode: int = 0, map_index: int = 0, _username: String = "Mercury")

void

join_server(host: String, port: int, username: String)

void

_on_server_disconnected()

void

add_player(peer_id: int, username: String)

void

_on_connected_to_server(username: String)

void

_on_connection_failed()

void

_on_player_killed(victim: Player, _killer: int)

void

_join_match(username: String)

void

_leave_match()

void

_exit_tree()


Signals🔗

connection_failed() 🔗

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


Enumerations🔗

enum Mode: 🔗

Mode FREE_FOR_ALL = 0

Free-for-all mode where players compete individually.

Mode RABBIT = 1

Rabbit mode where players chase and protect a designated "rabbit" player.

Mode CAPTURE_THE_FLAG = 2

Capture the flag mode where teams compete to capture each other's flags.

Mode ARENA = 3

Arena mode where players engage in team deathmatch battles.

Mode BALL = 4

Ball mode where teams aim to control the ball and score goals.


Property Descriptions🔗

Match match 🔗

The Match manager.


Teams teams 🔗

The Teams manager.


MotionService motion_service 🔗

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


Scoreboard scoreboard 🔗

The scoreboard to keep track of scores.


float VICTIM_RESPAWN_TIME = 3.0 🔗

The time it takes for a player to respawn when killed, secconds (s).


int MATCH_DURATION = 1200 🔗

The total duration of a match, in secconds (s).


int WARMUP_START_DURATION = 25 🔗

The total duration of the warmup phase of a match.


PackedScene _PLAYER 🔗

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


PackedScene _FLAG 🔗

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


Node players = <unknown> 🔗

The spawn root for Player nodes.


Node objectives = <unknown> 🔗

The spawn root for Flag nodes.


MultiplayerSpawner player_spawner = <unknown> 🔗

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


MultiplayerSpawner map_spawner = <unknown> 🔗

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


MultiplayerSpawner objectives_spawner = <unknown> 🔗

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


Method Descriptions🔗

void _enter_tree() 🔗

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


void _ready() 🔗

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


Player _on_player_spawn(data: Dictionary) 🔗

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


Map _on_map_spawn(data: Variant = null) 🔗

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


void _unhandled_input(event: InputEvent) 🔗

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


bool is_peer_connected() 🔗

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


void start_server(port: int, _p_mode: int = 0, map_index: int = 0, _username: String = "Mercury") 🔗

This method starts a server.


void join_server(host: String, port: int, username: String) 🔗

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


void _on_server_disconnected() 🔗

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


void add_player(peer_id: int, username: String) 🔗

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


void _on_connected_to_server(username: String) 🔗

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


void _on_connection_failed() 🔗

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


void _on_player_killed(victim: Player, _killer: int) 🔗

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


void _join_match(username: String) 🔗

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


void _leave_match() 🔗

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


void _exit_tree() 🔗

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