turretLocal: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - " \| *(game[0-9]|version[0-9]|gr[0-9]|serverExec|mp|pr|descr|s[0-9]|p[0-9]{1,3}|r[0-9]|x1?[0-9]|seealso) *= +" to " |$1= ")
m (Text replacement - " is local" to " is local")
(One intermediate revision by the same user not shown)
Line 8: Line 8:
|gr1= Turrets
|gr1= Turrets


|mp= A vehicle turret will change locality when player gunner gets in it, just like vehicle changes locality when player driver gets in it. Many commands for turrets work only where turret is [[local]]. When gunner leaves turret it is supposed to change locality to the locality of the vehicle.
|mp= A vehicle turret will change locality when player gunner gets in it, just like vehicle changes locality when player driver gets in it. Many commands for turrets work only where turret is [[Multiplayer Scripting#Locality|local]]. When gunner leaves turret it is supposed to change locality to the locality of the vehicle.


|descr= Checks if a turret is [[local]].
|descr= Checks if a turret is [[Multiplayer Scripting#Locality|local]].


|s1= vehicle '''turretLocal''' turretPath
|s1= vehicle [[turretLocal]] turretPath


|p1= vehicle: [[Object]]
|p1= vehicle: [[Object]]

Revision as of 18:09, 21 June 2021

Hover & click on the images for description

Description

Description:
Checks if a turret is local.
Multiplayer:
A vehicle turret will change locality when player gunner gets in it, just like vehicle changes locality when player driver gets in it. Many commands for turrets work only where turret is local. When gunner leaves turret it is supposed to change locality to the locality of the vehicle.
Groups:
Turrets

Syntax

Syntax:
vehicle turretLocal turretPath
Parameters:
vehicle: Object
turretPath: Array
Return Value:
Boolean (or, prior to Arma 3 v1.94, Nothing if the turret is non-existent)

Examples

Example 1:
_isLocal = vehicle player turretLocal [0];
Example 2:
if (heli turretLocal [1]) then {heli setVehicleAmmo 1};
Example 3:
if (isNil {heli turretLocal [5]}) then {hint "Turret 5 is non-existent"};

Additional Information

See also:
turretOwnersetVehicleAmmosetVehicleAmmoDefremoveWeaponTurretaddWeaponTurretaddMagazineTurretmagazinesTurretremoveMagazinesTurretremoveMagazineTurretweaponsTurretcurrentMagazineDetailTurretcurrentMagazineTurretcurrentWeaponTurretselectWeaponTurretturretUnitallTurrets

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note