{"name":"turretLocal","operator":null,"title":"turretLocal","type":"command","url":"https://community.bistudio.com/wiki/turretLocal","revid":378399,"updated":"2026-04-04T08:02:12Z","groups":["Turrets"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"1.32"}],"since":{"game":"arma3","name":"Arma 3","version":"1.32"},"arma3_since":"1.32","branch":null,"locality":{"argument":"global","effect":null,"server_exec":false},"exec":null,"description":"Checks if a turret is local.","syntaxes":[{"syntax":"vehicle turretLocal turretPath","since":null,"effect":null,"exec":null,"params":[{"name":"vehicle","type":"Object","optional":false,"default":null,"description":null,"types":["Object"],"since":null,"text":"vehicle: Object"},{"name":"turretPath","type":"Turret Path","optional":false,"default":null,"description":"supports [-1] for driver turret","types":["Turret Path"],"since":null,"text":"turretPath: Turret Path - supports [-1] for driver turret"}],"returns":{"type":"Boolean","types":["Boolean"],"description":null,"text":"Boolean"},"form":"binary","operator":null,"left":{"text":"vehicle","types":["Object"]},"right":{"text":"turretPath","types":["Turret Path"]}}],"examples":[{"text":"```sqf\n_isLocal = vehicle player turretLocal [0];\n```","code":["_isLocal = vehicle player turretLocal [0];"]},{"text":"```sqf\nif (heli turretLocal [1]) then { heli setVehicleAmmo 1 };\n```","code":["if (heli turretLocal [1]) then { heli setVehicleAmmo 1 };"]},{"text":"```sqf\nif (isNil { heli turretLocal [5] }) then { hint \"Turret 5 is non-existent\" };\n```","code":["if (isNil { heli turretLocal [5] }) then { hint \"Turret 5 is non-existent\" };"]}],"multiplayer":"A vehicle turret will change locality when player gunner gets in it, just like vehicle changes locality when player driver gets in it.\nMany commands for turrets work only where turret is local.\nWhen gunner leaves turret it is supposed to change locality to the locality of the vehicle.","problems":null,"aliases":[],"see_also":["turretOwner","setVehicleAmmo","setVehicleAmmoDef","removeWeaponTurret","addWeaponTurret","addMagazineTurret","magazinesTurret","removeMagazinesTurret","removeMagazineTurret","weaponsTurret","currentMagazineDetailTurret","currentMagazineTurret","currentWeaponTurret","selectWeaponTurret","turretUnit","allTurrets"],"notes":[],"categories":["Arma 3: New Scripting Commands","Arma 3: Scripting Commands","Command Group: Turrets","Introduced with Arma 3 version 1.32","Scripting Commands"]}