{"name":"BIS_fnc_destroyer01GetShipPart","title":"BIS fnc destroyer01GetShipPart","type":"function","url":"https://community.bistudio.com/wiki/BIS_fnc_destroyer01GetShipPart","revid":379555,"updated":"2026-10-31T13:48:52Z","groups":["Destroyer"],"status":"ok","games":{"arma3":"1.84"},"since":"arma3 1.84","arma3_since":"1.84","description":"Helper function that returns one part of a multi-part ship by its class name. It searches the ship's `\"bis_carrierParts\"` variable, which BIS_fnc_destroyer01Init creates on the server.\nIt is used by the destroyer's Eden Editor attribute expressions (e.g. to pass the hull part to BIS_fnc_destroyer01InitHullNumbers) and can also be used in scripts.\n\n> [!IMPORTANT]\n> The function only works on the server. On other machines, and when the ship has no parts or no class name is given, it returns Nothing.\n\nIf several parts have the same class, the last one in the list is returned.","syntaxes":[{"syntax":"[ship, partClass] call BIS_fnc_destroyer01GetShipPart","params":[{"name":"ship","type":"Object","description":"the ship's base object","type_expr":"Object"},{"name":"partClass","type":"String","description":"class name of the part to find, e.g. `\"Land_Destroyer_01_hull_04_F\"`","type_expr":"String"}],"returns":{"type":"Object","type_expr":"Object","description":"the part, or objNull if the ship has no part of this class"}}],"examples":[{"code":["// on the server: open the hangar doors of the destroyer named myDestroyer\nprivate _hull = [myDestroyer, \"Land_Destroyer_01_hull_04_F\"] call BIS_fnc_destroyer01GetShipPart;\n[_hull, 1, false] call BIS_fnc_destroyer01AnimateHangarDoors;"]}],"see_also":["BIS_fnc_destroyer01Init","BIS_fnc_destroyer01InitHullNumbers","BIS_fnc_destroyer01AnimateHangarDoors"]}