---
name: "BIS_fnc_boatRack01ActionAdd"
type: function
status: ok
groups: ["Boat Recovery"]
arma3_since: "1.84"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/BIS_fnc_boatRack01ActionAdd
revid: 379545
updated: 2026-10-31T13:42:01Z
---

# BIS_fnc_boatRack01ActionAdd

*Function · Boat Recovery · Arma 3 v1.84*

## Description

Part of the boat recovery system: adds the "Recover Boat" hold action (see [BIS_fnc_holdActionAdd](../functions/BIS_fnc_holdActionAdd.md)) to the boat that the player is driving near a boat rack.
The function is the on-activation statement of the trigger that [BIS_fnc_boatRack01Init](../functions/BIS_fnc_boatRack01Init.md) creates around the boat rack; it is meant for internal use.

The function:

- gets the boat rack from the trigger's `"BIS_linkedBoatRack"` variable and, if a list of objects is given, takes the boat from it: the first object of kind `"Ship"` that is [cameraOn](../commands/cameraOn.md)
- stores the boat on the trigger in the variable `"bis_loadedVehicle"`
- adds a 5 seconds hold action with priority 1000 to the boat; whether it is shown and can progress is decided once, when it is added, by [BIS_fnc_boatRack01CanExetuteAction](../functions/BIS_fnc_boatRack01CanExetuteAction.md) and [BIS_fnc_boatRack01CanProgressAction](../functions/BIS_fnc_boatRack01CanProgressAction.md)
- while the action is held, the boat is slowed down and then held in place
- when it is completed, the boat is loaded onto the empty rack with [setVehicleCargo](../commands/setVehicleCargo.md) and [BIS_fnc_boatRack01AdjustZOffset](../functions/BIS_fnc_boatRack01AdjustZOffset.md) is called; the action is then removed
- appends `[boat, trigger, actionID]` to the boat's `"bis_attachedActionID"` variable, which [BIS_fnc_boatRack01ActionRemove](../functions/BIS_fnc_boatRack01ActionRemove.md) uses (a boat can have actions from several racks)

## Syntax

```sqf
[trigger, boat] call BIS_fnc_boatRack01ActionAdd
```

**Parameters:**

- `trigger`: [Object](../topics/Object.md) - the boat rack's trigger
- `boat`: [Array](../topics/Array.md) or [Object](../topics/Object.md) - (Optional, default [objNull](../commands/objNull.md)) the boat, or the trigger's list of objects (`thisList`) to find the boat in

**Returns:** [Nothing](../topics/Nothing.md)

## Examples

### Example 1

Trigger statements set by [BIS_fnc_boatRack01Init](../functions/BIS_fnc_boatRack01Init.md):

```sqf
_triggerLoad setTriggerStatements
[
    format ["%1 call BIS_fnc_boatRack01ActionCondition", [_triggerAreaSizeX, _triggerAreaSizeY, _triggerAreaSizeZ, _boatRecoveryPointList]],
    "[thisTrigger,thisList] call bis_fnc_boatRack01ActionAdd;",
    "[thisTrigger] call bis_fnc_boatRack01ActionRemove;"
];
```

## See also

[BIS_fnc_boatRack01Init](../functions/BIS_fnc_boatRack01Init.md) · [BIS_fnc_boatRack01ActionRemove](../functions/BIS_fnc_boatRack01ActionRemove.md) · [BIS_fnc_boatRack01AdjustZOffset](../functions/BIS_fnc_boatRack01AdjustZOffset.md) · [BIS_fnc_holdActionAdd](../functions/BIS_fnc_holdActionAdd.md)

<sub>Source: [BI Community Wiki — BIS fnc boatRack01ActionAdd](https://community.bistudio.com/wiki/BIS_fnc_boatRack01ActionAdd) (revision 379545).</sub>
