BIS fnc addVirtualItemCargo: Difference between revisions
Jump to navigation
Jump to search
Kamaradski (talk | contribs) No edit summary |
Kamaradski (talk | contribs) No edit summary |
||
Line 64: | Line 64: | ||
<code>["AmmoboxInit",[_myBox,true]] call BIS_fnc_arsenal; | <code>["AmmoboxInit",[_myBox,true]] call BIS_fnc_arsenal; | ||
[_myBox,[true],true] call BIS_fnc_removeVirtualItemCargo; | [_myBox,[true],true] call BIS_fnc_removeVirtualItemCargo; | ||
[_myBox,["U_B_CombatUniform_mcam", "U_B_CombatUniform_mcam_tshirt" ],true] call BIS_fnc_addVirtualItemCargo; | [_myBox,["U_B_CombatUniform_mcam","U_B_CombatUniform_mcam_tshirt"],true] call BIS_fnc_addVirtualItemCargo; | ||
</code> | </code> | ||
</dd> | </dd> | ||
</dl> | </dl> | ||
<!-- DISCONTINUE Notes --> | <!-- DISCONTINUE Notes --> |
Revision as of 00:57, 17 October 2014
Description
- Description:
/* Description: Add virtual items to an object (e.g., ammo box). Virtual items can be selected in the Arsenal. Parameter(s): 0: OBJECT - objct to which items will be added 1: STRING or ARRAY of STRINGs - item class(es) to be added 2 (Optional): BOOL - true to add items globally (default: false) 3 (Optional): BOOL - true to add Arsenal action (default: true) Returns: ARRAY of ARRAYs - all virtual items within the object's space in format [<items>,<weapons>,<magazines>,<backpacks>] */
(Placeholder description extracted from the function header by BIS_fnc_exportFunctionsToWiki)- Execution:
- call
- Groups:
- Uncategorised
Syntax
- Syntax:
- Syntax needed
- Return Value:
- Return value needed
Examples
- Example 1:
[ _myBox, [ "U_B_CombatUniform_mcam","U_B_CombatUniform_mcam_tshirt","Rangefinder","MineDetector" ], true] call BIS_fnc_addVirtualItemCargo;
Additional Information
- See also:
- BIS_fnc_addVirtualBackpackCargo BIS_fnc_addVirtualMagazineCargo BIS_fnc_addVirtualWeaponCargo
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note
Notes
Bottom Section
- Posted on October 16, 2014 - 23:55 (UTC)
- Kamaradski
-
In AmmoboxInit mode, for the ammobox to ONLY contain your white-listed items in the ammobox, you should first issue the BIS_fnc_removeVirtualItemCargo command. Otherwise the box will contain non whitelisted clutter.
Example:["AmmoboxInit",[_myBox,true]] call BIS_fnc_arsenal; [_myBox,[true],true] call BIS_fnc_removeVirtualItemCargo; [_myBox,["U_B_CombatUniform_mcam","U_B_CombatUniform_mcam_tshirt"],true] call BIS_fnc_addVirtualItemCargo;