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.
_pv | Name of the publicVariable [String] |
_value | Value to check and broadcast if it is not the same as the previous one, code will always be broadcasted [Any] |
True if if broadcasted, otherwise false [Boolean]
// 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;
Xeno