turretLocal: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) |
Lou Montana (talk | contribs) m (Text replacement - "<code>([^ ]*)\[\[([a-zA-Z][a-zA-Z0-9_]+)\]\]([^ ]*)<\/code>" to "<code>$1$2$3</code>") |
||
Line 20: | Line 20: | ||
|r1= [[Boolean]] (or, prior to Arma 3 v1.94, [[Nothing]] if the turret is non-existent) | |r1= [[Boolean]] (or, prior to Arma 3 v1.94, [[Nothing]] if the turret is non-existent) | ||
|x1= <code>_isLocal = | |x1= <code>_isLocal = vehicle [[player]] [[turretLocal]] [0];</code> | ||
|x2= <code> | |x2= <code>if (heli [[turretLocal]] [1]) [[then]] {heli [[setVehicleAmmo]] 1};</code> | ||
|x3= <code> | |x3= <code>if ([[isNil]] {heli [[turretLocal]] [5]}) [[then]] {[[hint]] "Turret 5 is non-existent"};</code> | ||
|seealso= [[turretOwner]] [[setVehicleAmmo]] [[setVehicleAmmoDef]] [[removeWeaponTurret]] [[addWeaponTurret]] [[addMagazineTurret]] [[magazinesTurret]] [[removeMagazinesTurret]] [[removeMagazineTurret]] [[weaponsTurret]] [[currentMagazineDetailTurret]] [[currentMagazineTurret]] [[currentWeaponTurret]] [[selectWeaponTurret]] [[turretUnit]] [[allTurrets]] | |seealso= [[turretOwner]] [[setVehicleAmmo]] [[setVehicleAmmoDef]] [[removeWeaponTurret]] [[addWeaponTurret]] [[addMagazineTurret]] [[magazinesTurret]] [[removeMagazinesTurret]] [[removeMagazineTurret]] [[weaponsTurret]] [[currentMagazineDetailTurret]] [[currentMagazineTurret]] [[currentWeaponTurret]] [[selectWeaponTurret]] [[turretUnit]] [[allTurrets]] | ||
}} | }} |
Revision as of 11:16, 12 May 2022
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:
- turretOwner setVehicleAmmo setVehicleAmmoDef removeWeaponTurret addWeaponTurret addMagazineTurret magazinesTurret removeMagazinesTurret removeMagazineTurret weaponsTurret currentMagazineDetailTurret currentMagazineTurret currentWeaponTurret selectWeaponTurret turretUnit allTurrets
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