BIS fnc arsenal: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - " <!-- (DIS)?CONTINUE Notes -->" to "") |
Lou Montana (talk | contribs) m (Some wiki formatting) |
||
Line 1: | Line 1: | ||
{{RV|type=function | {{RV|type=function | ||
| arma3 | |game1= arma3 | ||
|version1= 1.24 | |||
| | |gr1= Inventory | ||
| | |descr= Function used for the [[Arma 3: Arsenal|Virtual Arsenal]]. The function features four different modes, each mode comes with its own parameters. | ||
{{Feature | Informative | If Arsenal is launched within the first second from the mission start, the unit loadout will be randomised.}} | |||
| | |s1= [mode, params] call [[BIS_fnc_arsenal]] | ||
| [mode,params] | |p1= mode: [[String]] - mode, can be "Open", "Preload", "AmmoboxInit" and "AmmoboxExit" | ||
|p2= params: [[Anything]] - parameters used by mode (See below for details) | |||
* '''"Open"''' - Opens the [[Arsenal]] | |||
** 0: [[Boolean]] - [[true|True]] to open full [[Arsenal]] with all items available (default: [[false]]) | |||
* '''"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 | |||
** 0: [[Object]] - the object the [[Arma 3: Arsenal|Arsenal]] was added to | |||
| | |r1= [[Nothing]] | ||
| [[ | |x1= <code>{{cc|Opens [[Arma 3: Arsenal|Arsenal]] with all items}} | ||
["Open", [<nowiki/>[[true]]]] [[call]] [[BIS_fnc_arsenal]];</code> | |||
| | |x2= <code>{{cc|Preloads [[Arma 3: Arsenal|Arsenal]]'s config}} | ||
| | ["Preload"] [[call]] [[BIS_fnc_arsenal]];</code> | ||
| | |x3= <code>{{cc|Adds full [[Arsenal]] to the [[player]] object and makes the [[addAction|action]] available when the player is closer than 10 meters from ammoBox}} | ||
["AmmoboxInit", [ammoBox, [[true]], { _this [[distance]] _target < 10 }]] [[call]] [[BIS_fnc_arsenal]];</code> | |||
|x4= <code>{{cc|Removes [[Arsenal]] from [[player]] object}} | |||
["AmmoboxExit", [[player]]] [[call]] [[BIS_fnc_arsenal]];</code> | |||
|seealso= [[Arma 3: Arsenal]], [[BIS_fnc_garage]] | |||
}} | |||
Revision as of 19:40, 10 April 2021
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 "Open", "Preload", "AmmoboxInit" and "AmmoboxExit"
- params: Anything - parameters used by mode (See below for details)
- "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