turretOwner: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
m (Text replacement - "|size=.8" to "|size= 0.75")
 
(38 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Command|Comments=
{{RV|type=command
____________________________________________________________________________________________


| arma3 |Game name=
|game1= arma3
|version1= 1.38


|1.38|Game version=
|arg= global


|arg= global |Multiplayer Arguments=
|serverExec= server
|serverExec= server|=


|gr1= Turrets |GROUP1=
|gr1= Turrets


|gr1= Multiplayer |GROUP1=
|descr= Returns id of the turret's [[owner]]. Returns 0 on non-server and SP.


____________________________________________________________________________________________
|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. A vehicle can have one [[owner]] while turrets have different [[owner]]s.


| Returns id of the [[owner]] of the turret. Server only. Returns 0 on non-server and SP. <br><br>
|s1= vehicle [[turretOwner]] turretPath
'''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=
|p1= vehicle: [[Object]]


|p1= vehicle: [[Object]] |PARAMETER1=  
|p2= turretPath: [[Array]] format [[Turret Path]] - since {{GVI|arma3|2.08|size= 0.75}} [-1] (driver) is supported


|p2= turretPath: [[Array]] |PARAMETER2=
|r1= [[Number]] - [[owner]] id


| [[Number]] - [[owner]] id |RETURNVALUE=
|x1= <sqf>_ownerId = vehicle player turretOwner [0];</sqf>


 
|seealso= [[owner]] [[setOwner]] [[turretLocal]] [[setVehicleAmmo]] [[setVehicleAmmoDef]] [[removeWeaponTurret]] [[addWeaponTurret]] [[addMagazineTurret]] [[magazinesTurret]] [[removeMagazinesTurret]] [[removeMagazineTurret]] [[weaponsTurret]] [[currentMagazineDetailTurret]] [[currentMagazineTurret]] [[currentWeaponTurret]] [[selectWeaponTurret]]
|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=
 
| mp= Run on server  |MPBEHAVIOUR=
____________________________________________________________________________________________
}}
}}
<h3 style='display:none'>Notes</h3>
<dl class='command_description'>
<!-- Note Section BEGIN -->
<!-- Note Section END -->
</dl>
<h3 style='display:none'>Bottom Section</h3>
[[Category:Arma_3:_New_Scripting_Commands_List|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]

Latest revision as of 12:10, 21 December 2022

Hover & click on the images for description

Description

Description:
Returns id of the turret's owner. Returns 0 on non-server and SP.
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. A vehicle can have one owner while turrets have different owners.
Groups:
Turrets

Syntax

Syntax:
vehicle turretOwner turretPath
Parameters:
vehicle: Object
turretPath: Array format Turret Path - since Arma 3 logo black.png2.08 [-1] (driver) is supported
Return Value:
Number - owner id

Examples

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

Additional Information

See also:
owner setOwner turretLocal setVehicleAmmo setVehicleAmmoDef removeWeaponTurret addWeaponTurret addMagazineTurret magazinesTurret removeMagazinesTurret removeMagazineTurret weaponsTurret currentMagazineDetailTurret currentMagazineTurret currentWeaponTurret selectWeaponTurret

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