Level Editor/Scripting/Reference/GamemodeClientScript
The base class of client.gd: the script starts with extends GamemodeClientScript.
The base class of a map's client.gd: what its gamemode shows.
This script runs on every player's machine. It can read the counters the server keeps and put HUD widgets on screen, and it cannot change anything about the match. Everything it can do goes through api.
It declares nothing: the server's counters and teams arrive by themselves.
See Level Editor/Scripting/Reference for every class, and Level Editor/Scripting/Reference/Sandbox for the rest of GDScript a script may use.
Properties
api
client.gdEverything this script can do goes through api. See GamemodeClientApi.
Everything this script can do, as a GamemodeClientApi.
Hooks
_start
client.gdThe server's counters and teams have arrived and can be read. Put your HUD widgets on screen here.
void_counter_changed
client.gdA counter changed. scope is api.SCOPE_PLAYER, api.SCOPE_TEAM or api.SCOPE_GLOBAL; key is the player's entity id, the team, or 0 for a global counter. Widgets update by themselves, so this is only needed for something of your own.
scope:intkey:intname:StringNamevalue:intReturns:void
_match_ended
client.gdThe round is decided. team is the winner, or 0 for a draw.
team:intReturns:void