CBA_fnc_publicVariable

Description

CBA_fnc_publicVariable does only broadcast the new value if it doesn’t exist in missionNamespace or the new value is different to the one in missionNamespace.  Checks also for different types.  Nil as value gets always broadcasted.

Should reduce network traffic.

Parameters

_pvName of the publicVariable [String]
_valueValue to check and broadcast if it is not the same as the previous one, code will always be broadcasted [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

Close