BIS fnc arsenal: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "<dl class="command_description"> <dd class="notedate">" to "<dl class="command_description"> <dt></dt> <dd class="notedate">")
m (Text replacement - " <!-- (DIS)?CONTINUE Notes -->" to "")
Line 40: Line 40:




<!-- CONTINUE Notes -->
<dl class="command_description">
<dl class="command_description">
<dt></dt>
<dt></dt>
Line 52: Line 51:
</dd>
</dd>
</dl>
</dl>
<!-- DISCONTINUE Notes -->

Revision as of 01:49, 6 April 2021

Hover & click on the images for description

Description

Description:
Description needed
Execution:
call
Groups:
Inventory

Syntax

Syntax:
Syntax needed
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:
Return value needed

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



Posted on October 6, 2014 - 04:59 (UTC)
Benargee
To remove arsenal from an ammo box, you can use: removeAllActions ammobox