turretLocal: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "<code>([^ ]*)\[\[([a-zA-Z][a-zA-Z0-9_]+)\]\]([^ ]*)<\/code>" to "<code>$1$2$3</code>") |
Killzone Kid (talk | contribs) No edit summary |
||
(3 intermediate revisions by 2 users 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 [[Multiplayer Scripting#Locality|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 [[Multiplayer Scripting#Locality|local]]. | |descr= Checks if a turret is [[Multiplayer Scripting#Locality|local]]. | ||
Line 16: | Line 18: | ||
|p1= vehicle: [[Object]] | |p1= vehicle: [[Object]] | ||
|p2= turretPath: [[Array]] | |p2= turretPath: [[Array]] format [[Turret Path]]. Also supports [-1] for driver turret | ||
|r1= [[Boolean]] | |r1= [[Boolean]] | ||
|x1= < | |x1= <sqf>_isLocal = vehicle player turretLocal [0];</sqf> | ||
|x2= < | |x2= <sqf>if (heli turretLocal [1]) then { heli setVehicleAmmo 1 };</sqf> | ||
|x3= < | |x3= <sqf>if (isNil { heli turretLocal [5] }) then { hint "Turret 5 is non-existent" };</sqf> | ||
|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]] | ||
}} | }} |
Latest revision as of 23:01, 3 February 2024
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 format Turret Path. Also supports [-1] for driver turret
- Return Value:
- Boolean
Examples
- Example 1:
- Example 2:
- Example 3:
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