BIS_fnc_arsenal

From Bohemia Interactive Community
Revision as of 20:45, 10 April 2021 by Lou Montana (talk | contribs) (Fix description)
Jump to navigation Jump to search
Hover & click on the images for description

Description

Description:
Function used for the Virtual Arsenal. The function features four different modes, each mode comes with its own parameters.
If Arsenal is launched within the first second from the mission start, the unit loadout will be randomised.
Execution:
call
Groups:
Inventory

Syntax

Syntax:
[mode, params] call BIS_fnc_arsenal
Parameters:
mode: String - mode, can be "Open", "Preload", "AmmoboxInit" and "AmmoboxExit"
params: Anything - mode parameters:
  • "Open" - Opens the Arsenal
  • "Preload" - Preloads item configs, without preloading the configs are parsed the first time it is opened
    • No parameters
  • "AmmoboxInit" - Adds a virtual ammobox. Action to access the Arsenal will be added automatically to all clients
    • 0: Object - Object which should get a virtual ammobox
    • 1: Boolean - (Optional, default false) true to make all items available
    • 2: Code - (Optional, default false) condition for the Arsenal to be accessible
      • passed arguments are the same as in addAction condition, i.e. _target - the object, _this - the caller
  • "AmmoboxExit" - remove virtual ammobox
Return Value:
Nothing

Examples

Example 1:
// Opens Arsenal with all items ["Open", [true]] call BIS_fnc_arsenal;
Example 2:
// Preloads Arsenal's config ["Preload"] call BIS_fnc_arsenal;
Example 3:
// Adds full Arsenal to the player object and makes the action available when the player is closer than 10 meters from ammoBox ["AmmoboxInit", [ammoBox, true, { _this distance _target < 10 }]] call BIS_fnc_arsenal;
Example 4:
// Removes Arsenal from player object ["AmmoboxExit", player] call BIS_fnc_arsenal;

Additional Information

See also:
Arma 3: ArsenalBIS_fnc_garage

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