BIS fnc arsenal: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "<code>([^<]*)\[\[([a-zA-Z][a-zA-Z0-9_]+)\]\]([^<]*) *<\/code>" to "<code>$1$2$3</code>") |
Lou Montana (talk | contribs) m (Text replacement - "<code>([^<]*)\[\[([a-zA-Z][a-zA-Z0-9_]+)\]\]([^<]*) *<\/code>" to "<code>$1$2$3</code>") |
||
Line 44: | Line 44: | ||
|x4= <code>{{cc|Removes Arsenal from player object}} | |x4= <code>{{cc|Removes Arsenal from player object}} | ||
["AmmoboxExit", player] call | ["AmmoboxExit", player] call BIS_fnc_arsenal;</code> | ||
|seealso= [[Arma 3: Arsenal]] [[BIS_fnc_garage]] | |seealso= [[Arma 3: Arsenal]] [[BIS_fnc_garage]] | ||
}} | }} |
Revision as of 21:38, 12 July 2022
Description
- Description:
- Function used for the Virtual Arsenal. The function features four different modes, each mode comes with its own parameters.
- Execution:
- call
- Groups:
- Inventory
Syntax
- Syntax:
- [mode, params] call BIS_fnc_arsenal
- Parameters:
- mode: String - mode, can be one of:
- params: Anything - mode parameters:
- "Open": [full, cargo, center]
- full: Boolean - (Optional, default false) true to open full Arsenal with all items available
- cargo: Object to use as the cargo carrier (cargo is added with the BIS_fnc_addVirtualItemCargo functions)
- center: Object whose arsenal will be modified
- "Preload": no parameters
- "AmmoboxInit": [ammobox, allItems, condition]
- ammobox: Object - Object which should get a virtual ammobox
- allItems: Boolean - (Optional, default false) true to make all items available
- condition: Code - (Optional, default
{ true }
) condition for the Arsenal to be accessible. Available arguments are the same as in addAction's condition parameter:- _target: Object - object to which the action is attached or, if the object is a unit inside of vehicle, the vehicle
- _this: Object - caller person to whom the action is shown (or not depending on condition)
- _originalTarget: Object - original object to which the action is attached, regardless if the object/unit is in a vehicle or not
- "AmmoboxExit": [ammobox]
- "Open": [full, cargo, center]
- 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: Arsenal BIS_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