CBA_fnc_setVarNet

Description

Broadcast a object variable value to all machines.  Used to reduce network traffic.

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

Parameters

_objectObject namespace <OBJECT, GROUP>
_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 variable space or the value is not 50
_broadcasted = [player, "somefish", 50] call CBA_fnc_setVarNet;

Author

Xeno, commy2

string used by format
Close