> For the complete documentation index, see [llms.txt](https://kaarlos.gitbook.io/arma3-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kaarlos.gitbook.io/arma3-documentation/snippets-and-scripts/ace-and-vanilla-arsenal.md).

# ACE & Vanilla Arsenal

## ACE

{% tabs %}
{% tab title="Type 1" %}
Begin by placing an object, such as a `B_CargoNet_01_ammo_F`, but feel free to use any object you prefer. Now double-click on the object and enter the following code into the **init** field:

{% code overflow="wrap" %}

```sqf
[this, true] call ace_arsenal_fnc_initBox;
```

{% endcode %}
{% endtab %}

{% tab title="Type 2" %}
This one is unique with its special design. Begin by placing an object. Double-click on it to access the init field. Insert the following code:

{% code overflow="wrap" %}

```sqf
this addAction ["<t color='#FFFFFF' size='1'><img image='a3\ui_f\data\logos\a_64_ca.paa'></img><t color='#ffd700' size='1' font='puristaBold'>ACE ARSENAL<t>", {[player, player, true] call ace_arsenal_fnc_openBox;}];
```

{% endcode %}
{% endtab %}

{% tab title="Type 3" %}
Start by placing down a **trigger** and put this activation settings:

> **Activation:**
>
> `Type` = None
>
> `Activation` = Any Player
>
> `Activation Type` = Present
>
> `Repeatable` = \[YES]
>
> `Server Only` = \[NO]

Now that you have filled in those settings, navigate to Expression and utilize the following:

> **Expression:**
>
> `Condition:`
>
> ```sqf
> player in thisList
> ```
>
> `On Activation:`
>
> {% code overflow="wrap" %}
>
> ```sqf
> thisTrigger setVariable ["_playerAction", player addAction ["<t color='#FFFFFF' size='1.4'><img image='a3\ui_f\data\logos\a_64_ca.paa'></img><t color='#ffd700' size='1.4' font='puristaBold'> ACE Arsenal</t>", {[player, player, true] call ace_arsenal_fnc_openBox;}]];
> ```
>
> {% endcode %}
>
> `On Deactivation:`
>
> ```sqf
> player removeAction (thisTrigger getVariable ["_playerAction", -1])
> ```

Now you've set up a trigger area. When a player enters this area, they will be presented with an action called ACE Arsenal.
{% endtab %}
{% endtabs %}

## Vanilla

{% tabs %}
{% tab title="Type 1" %}

> **Expression:**
>
> `Condition:`
>
> ```sqf
> player in thisList
> ```
>
> `On Activation:`
>
> {% code overflow="wrap" %}
>
> ```sqf
> thisTrigger setVariable ["_playerAction", player addAction ["Arsenal", {["Open", [true]] call BIS_fnc_arsenal;}]];
> ```
>
> {% endcode %}
>
> `On Deactivation:`
>
> {% code overflow="wrap" %}
>
> ```sqf
> player removeAction (thisTrigger getVariable ["_playerAction", -1])
> ```
>
> {% endcode %}
> {% endtab %}

{% tab title="Type 2" %}
Begin by placing an object, such as a `B_CargoNet_01_ammo_F`, but feel free to use any object you prefer. Now double-click on the object and enter the following code into the **init** field:

{% code overflow="wrap" %}

```sqf
this addAction ["Arsenal", {["Open", [true]] call BIS_fnc_arsenal;
```

{% endcode %}
{% endtab %}
{% endtabs %}
