turretOwner: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\{\{GameCategory\|(arma[0123])\|[ _]?New[ _]Scripting[ _]Commands[ _]List\}\}" to "{{GameCategory|$1|New Scripting Commands}}")
m (Text replacement - "_{10,} " to "")
Line 1: Line 1:
{{Command|Comments=
{{Command|Comments=
____________________________________________________________________________________________


| arma3 |Game name=
| arma3 |Game name=
Line 10: Line 9:


|gr1= Turrets |GROUP1=
|gr1= Turrets |GROUP1=
___________________________________________________________________________________________


| Returns id of the [[owner]] of the turret. Server only. Returns 0 on non-server and SP. <br><br>
| Returns id of the [[owner]] of the turret. Server only. Returns 0 on non-server and SP. <br><br>
'''Some info on turrets:''' 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. A vehicle can have one [[owner]] while turrets have different [[owner]]s. |DESCRIPTION=
'''Some info on turrets:''' 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. A vehicle can have one [[owner]] while turrets have different [[owner]]s. |DESCRIPTION=
____________________________________________________________________________________________


| vehicle '''turretOwner''' turretPath |SYNTAX=
| vehicle '''turretOwner''' turretPath |SYNTAX=
Line 26: Line 23:


|x1= <code>_ownerId = [[vehicle]] [[player]] [[turretOwner]] [0];</code>|EXAMPLE1=  
|x1= <code>_ownerId = [[vehicle]] [[player]] [[turretOwner]] [0];</code>|EXAMPLE1=  
____________________________________________________________________________________________


| [[owner]], [[setOwner]], [[turretLocal]], [[setVehicleAmmo]], [[setVehicleAmmoDef]], [[removeWeaponTurret]], [[addWeaponTurret]], [[addMagazineTurret]], [[magazinesTurret]], [[removeMagazinesTurret]], [[removeMagazineTurret]], [[weaponsTurret]], [[currentMagazineDetailTurret]], [[currentMagazineTurret]], [[currentWeaponTurret]], [[selectWeaponTurret]]|SEEALSO=  
| [[owner]], [[setOwner]], [[turretLocal]], [[setVehicleAmmo]], [[setVehicleAmmoDef]], [[removeWeaponTurret]], [[addWeaponTurret]], [[addMagazineTurret]], [[magazinesTurret]], [[removeMagazinesTurret]], [[removeMagazineTurret]], [[weaponsTurret]], [[currentMagazineDetailTurret]], [[currentMagazineTurret]], [[currentWeaponTurret]], [[selectWeaponTurret]]|SEEALSO=  


| mp= Run on server  |MPBEHAVIOUR=  
| mp= Run on server  |MPBEHAVIOUR=  
____________________________________________________________________________________________
}}
}}



Revision as of 03:44, 17 January 2021

Hover & click on the images for description

Description

Description:
Returns id of the owner of the turret. Server only. Returns 0 on non-server and SP.

Some info on turrets: 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. A vehicle can have one owner while turrets have different owners.
Multiplayer:
Run on server
Groups:
Turrets

Syntax

Syntax:
vehicle turretOwner turretPath
Parameters:
vehicle: Object
turretPath: Array
Return Value:
Number - owner id

Examples

Example 1:
_ownerId = vehicle player turretOwner [0];

Additional Information

See also:
ownersetOwnerturretLocalsetVehicleAmmosetVehicleAmmoDefremoveWeaponTurretaddWeaponTurretaddMagazineTurretmagazinesTurretremoveMagazinesTurretremoveMagazineTurretweaponsTurretcurrentMagazineDetailTurretcurrentMagazineTurretcurrentWeaponTurretselectWeaponTurret

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

Notes

Bottom Section