Set synced var

Sets the persistent global variable of that player slot. This value persists before and after matches, as well as in replays. It is also synced at the start of online matches. See for how to get this value.

Syntax
set_synced_var( player, value );

Returns
N/A

Basic
// Called from css_update.gml: // This character sets their synced var to true when selecting a specific palette. if (get_player_color(player) == 12) { set_synced_var(player, 1); } else { set_synced_var(player, 0); }