{"name":"BIS_fnc_boatRack01Init","title":"BIS fnc boatRack01Init","type":"function","url":"https://community.bistudio.com/wiki/BIS_fnc_boatRack01Init","revid":379548,"updated":"2026-10-31T13:44:08Z","groups":["Boat Recovery"],"status":"ok","games":{"arma3":"1.84"},"since":"arma3 1.84","arma3_since":"1.84","description":"Main function of the boat recovery system, which lets a player drive a boat onto a boat rack and load it with a hold action. The boat rack must support Vehicle in Vehicle transport.\nThe function is called by the `init` event handler of the boat rack's class. It does nothing in the Eden Editor or when the boat rack is objNull.\n\nIt reads these entries of the rack's `CfgVehicles >> class >> BoatRecoverySystem` config class:\n\n- `triggerAreaSizeX`, `triggerAreaSizeY`, `triggerAreaSizeZ` - size of the area around each recovery point in which the boat must be\n- every subclass is a recovery point; its `memoryPointPosLoad` is the name of the rack's memory point at the centre of that area\n\nIt then creates a local, repeatedly activated trigger (`\"ANYPLAYER\"`, `\"PRESENT\"`) around the rack, large enough to cover all recovery areas, and stores the rack on it in the variable `\"BIS_linkedBoatRack\"`. The trigger uses:\n\n- `BIS_fnc_boatRack01ActionCondition` as condition: the player drives a boat under 25 km/h inside a recovery area, the rack is empty and can carry the boat\n- BIS_fnc_boatRack01ActionAdd on activation, which gives the boat the \"Recover Boat\" hold action\n- BIS_fnc_boatRack01ActionRemove on deactivation\n\nFinally it spawns BIS_fnc_boatRack01InitAdjustZOffsets to adjust the rack to a boat that is already loaded at mission start.","syntaxes":[{"syntax":"[boatRack] call BIS_fnc_boatRack01Init","params":[{"name":"boatRack","type":"Object","description":"the boat rack (the init event handler passes it as `_this`)","type_expr":"Object"}],"returns":{"type":"Script Handle","type_expr":"Script Handle","description":"handle of the spawned BIS_fnc_boatRack01InitAdjustZOffsets; Nothing in the Eden Editor or if the boat rack is objNull"}}],"examples":[{"text":"Event handler of the boat rack's class:\n\n```cpp\nclass EventHandlers\n{\n    init = \"_this call BIS_fnc_BoatRack01Init;\";\n};\n```"}],"see_also":["BIS_fnc_boatRack01ActionAdd","BIS_fnc_boatRack01ActionRemove","BIS_fnc_boatRack01AdjustZOffset","BIS_fnc_boatRack01InitAdjustZOffsets","Arma 3: Vehicle in Vehicle Transport"]}