Arma 3 Scripting

BIS_fnc_boatRack01AdjustZOffset

  • Arma 3 v1.84

Function · Markdown · JSON · original wiki page

Description

Part of the boat recovery system: raises or lowers the boat rack's cargo bay to suit the loaded boat, so that different boats do not clip into the rack. It reads two entries of the rack's CfgVehicles >> class >> BoatRecoverySystem config class:

It then instantly animates the cargo bay to the offset of the boat's exact class (typeOf, inheritance is not checked), or to 0 if the class is not listed.

The function is called when the "Recover Boat" hold action of BIS_fnc_boatRack01ActionAdd has loaded a boat, and by BIS_fnc_boatRack01InitAdjustZOffsets for a boat loaded at mission start. It does nothing if either object is objNull.

Syntax

[boatRack, boat] call BIS_fnc_boatRack01AdjustZOffset

Parameters:

Returns: Nothing

Examples

Example 1

Load a boat onto a rack by script and adjust the rack to it, as the hold action does:

if (myBoatRack setVehicleCargo myBoat) then
{
    [myBoatRack, myBoat] call BIS_fnc_boatRack01AdjustZOffset;
};

See also

BIS_fnc_boatRack01Init · BIS_fnc_boatRack01InitAdjustZOffsets · BIS_fnc_boatRack01ActionAdd · setVehicleCargo