CBA_fnc_publicVariable

Description

Broadcast a variables value to all machines.  Used to reduce network traffic.

Does only broadcast the new value if it doesn’t exist in missionNamespace or if the new value is different to the one in missionNamespace.  Nil as value gets always broadcasted.

Parameters

_varNameName of the public variable STRING
_valueValue to broadcast <ANY>

Returns

True if if broadcasted, otherwise false <BOOLEAN>

Example

// This will only broadcast "somefish" if it either doesn't exist yet in the missionNamespace or the value is not 50
_broadcasted = ["somefish", 50] call CBA_fnc_publicVariable;

Author

Xeno, commy2

string used by format
Close