Skip to content

publicVariableClient

ffredyk edited this page Jul 23, 2026 · 1 revision

publicVariableClient

Category

Multiplayer

Arity

Binary<variableName> publicVariableClient <clientId>.

<string> publicVariableClient <number>

Description

Sends the value of a global variable to a specific client identified by client ID. The variable name is the left operand. Only the targeted client receives the update.

Placeholder/stub — full networking implementation is the host's responsibility.

How It Works

Fires the host's public variable event targeted at a specific client ID. More efficient than broadcasting when only one client needs the data.

Usage

// Send private message to client 3
_privateMsg = "You have been promoted!";
"_privateMsg" publicVariableClient 3;

// Send targeted data
_playerData = ["name", "rank", 42];
"_playerData" publicVariableClient _targetClientId;

Thread Safety

Depends on host implementation.

See Also

SQ# Wiki

Home

Engine Docs

Migration

Commands

Value Constructors

Arithmetic

Comparison

Logic

Array

String

Math

Random

Type & Introspection

HashMap

Code Execution

Concurrency

Scheduler

Thread Safety

Error

Output

Time

Multiplayer

Compiler

Clone this wiki locally