Jump to content
Nikander

BIS_fnc_addVirtualItemCargo

Recommended Posts

Noticed unexpected behavior with BIS_fnc_addVirtualItemCargo while editing and testing my multiplayer mission:

[missionNamespace, "FirstAidKit", false, false] call BIS_fnc_addVirtualItemCargo;

Code above appears to be broadcasting Arsenal cargo globally in missionNamespace to all connected clients, although documentation suggests the effect should be local. Verified with player-hosted LAN session for two computers, using the Arsenal on both host and client by issuing the command:

[] spawn BIS_fnc_Arsenal;

Looking at BIS_fnc_addVirtualItemCargo source with functions viewer in Eden the global broadcast seems quite obvious, so is it just me or is there a conflict between code and documentation ?

Excerpt from BIS_fnc_addVirtualItemCargo:

if (_save) then {

        if (typename _object == typename missionnamespace) then {

                _object setvariable ["bis_addVirtualWeaponCargo_cargo",_cargo];

                publicvariable "bis_addVirtualWeaponCargo_cargo";

        } else {

                _object setvariable ["bis_addVirtualWeaponCargo_cargo",_cargo,_isGlobal];

        };
};

 

 

Nikander

Share this post


Link to post
Share on other sites

Hey, did you find a solution/workaround for this?

Please see my thread, would appreciate some help.

 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×