Description
Part of the boat recovery system: adds the "Recover Boat" hold action (see BIS_fnc_holdActionAdd) 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 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 - 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 and BIS_fnc_boatRack01CanProgressAction
- 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 and BIS_fnc_boatRack01AdjustZOffset is called; the action is then removed
- appends
[boat, trigger, actionID]to the boat's"bis_attachedActionID"variable, which BIS_fnc_boatRack01ActionRemove uses (a boat can have actions from several racks)
Syntax
[trigger, boat] call BIS_fnc_boatRack01ActionAdd
Parameters:
trigger: Object - the boat rack's triggerboat: Array or Object - (Optional, default objNull) the boat, or the trigger's list of objects (thisList) to find the boat in
Returns: Nothing
Examples
Example 1
Trigger statements set by BIS_fnc_boatRack01Init:
_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 · BIS_fnc_boatRack01ActionRemove · BIS_fnc_boatRack01AdjustZOffset · BIS_fnc_holdActionAdd