BIS fnc arsenal: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - " <h3 style="display:none">Notes</h3> <dl class="command_description"> <!-- Note Section BEGIN --> <!-- Note Section END --> </dl>" to "") |
Lou Montana (talk | contribs) m (Text replacement - " *\| *([Cc]omments|COMMENTS|[Gg]ame [Nn]ame|Game [Vv]ersion|Game Version \(number surrounded by NO SPACES\)|Multiplayer Arguments \("local" or "global"\)|Multiplayer Effects \("local" or "global"\)|Multiplayer Execution \("server" o...) |
||
Line 1: | Line 1: | ||
{{Function | {{Function | ||
| arma3 | | arma3 | ||
|1.24 | |1.24 | ||
|gr1 = Inventory | |gr1 = Inventory | ||
| Function used for Virtual [[Arsenal]]. The function features four different modes, each mode comes with its own parameters.<br><br> | | Function used for Virtual [[Arsenal]]. The function features four different modes, each mode comes with its own parameters.<br><br> | ||
{{Informative | If Arsenal is launched within the 1st second from the mission start the unit loadout will be randomized}} | {{Informative | If Arsenal is launched within the 1st second from the mission start the unit loadout will be randomized}} | ||
| [mode,params] call '''BIS_fnc_arsenal''' | | [mode,params] call '''BIS_fnc_arsenal''' | ||
|p1= mode: [[String]] - Mode, can be "Open", "Preload", "AmmoboxInit" and "AmmoboxExit" | |p1= mode: [[String]] - Mode, can be "Open", "Preload", "AmmoboxInit" and "AmmoboxExit" | ||
|p2= params: [[Anything]] - Parameters used by mode (See below for details) | |p2= params: [[Anything]] - Parameters used by mode (See below for details) | ||
*'''"Open"''' - Opens the [[Arsenal]] | *'''"Open"''' - Opens the [[Arsenal]] | ||
Line 24: | Line 24: | ||
***Passed arguments are the same as in [[addAction]] condition, i.e. _target - the object, _this - the caller | ***Passed arguments are the same as in [[addAction]] condition, i.e. _target - the object, _this - the caller | ||
*'''"AmmoboxExit"''' - Remove virtual ammobox | *'''"AmmoboxExit"''' - Remove virtual ammobox | ||
**0: [[Object]] - The object the [[Arsenal]] was added to | **0: [[Object]] - The object the [[Arsenal]] was added to | ||
| [[Nothing]] | | [[Nothing]] | ||
|x1= <code>[ "Open", [<nowiki/>[[true]] ] ] [[call]] '''BIS_fnc_arsenal''';</code>{{codecomment|Opens [[Arsenal]] with all items}} | |x1= <code>[ "Open", [<nowiki/>[[true]] ] ] [[call]] '''BIS_fnc_arsenal''';</code>{{codecomment|Opens [[Arsenal]] with all items}} | ||
|x2= <code>[ "Preload" ] [[call]] '''BIS_fnc_arsenal''';</code>{{codecomment|Preloads config for [[Arsenal]]}} | |x2= <code>[ "Preload" ] [[call]] '''BIS_fnc_arsenal''';</code>{{codecomment|Preloads config for [[Arsenal]]}} | ||
|x3= <code>[ "AmmoboxInit", [ ammoBox, [[true]], {(_this [[distance]] _target) < 10} ] ] [[call]] '''BIS_fnc_arsenal''';</code>{{codecomment|Adds full [[Arsenal]] to [[player]] object and makes the [[addAction|action]] available when the player is as closer than 10 meters from ammoBox}} | |x3= <code>[ "AmmoboxInit", [ ammoBox, [[true]], {(_this [[distance]] _target) < 10} ] ] [[call]] '''BIS_fnc_arsenal''';</code>{{codecomment|Adds full [[Arsenal]] to [[player]] object and makes the [[addAction|action]] available when the player is as closer than 10 meters from ammoBox}} | ||
|x4= <code>[ "AmmoboxExit", [[player]] ] [[call]] '''BIS_fnc_arsenal''';</code>{{codecomment|Removes [[Arsenal]] from [[player]] object}} | |x4= <code>[ "AmmoboxExit", [[player]] ] [[call]] '''BIS_fnc_arsenal''';</code>{{codecomment|Removes [[Arsenal]] from [[player]] object}} | ||
| [[Arsenal]], [[BIS_fnc_garage]] | | [[Arsenal]], [[BIS_fnc_garage]] | ||
}} | }} | ||
Revision as of 22:37, 17 January 2021
Description
- Description:
- Function used for 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 - True to make all items available (optional, default: false)
- 2: Code - Condition for the Arsenal to be accessable (optional,default: {false})
- 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:
[ "Open", [true ] ] call BIS_fnc_arsenal;
Opens Arsenal with all items- Example 2:
[ "Preload" ] call BIS_fnc_arsenal;
Preloads config for Arsenal- Example 3:
[ "AmmoboxInit", [ ammoBox, true, {(_this distance _target) < 10} ] ] call BIS_fnc_arsenal;
Adds full Arsenal to player object and makes the action available when the player is as closer than 10 meters from ammoBox- Example 4:
[ "AmmoboxExit", player ] call BIS_fnc_arsenal;
Removes Arsenal from player object
Additional Information
- See also:
- 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
Bottom Section
- Posted on October 6, 2014 - 04:59 (UTC)
- Benargee
-
To remove arsenal from an ammo box, you can use:
removeAllActions ammobox