selectWeaponTurret: Difference between revisions

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


| arma3 |= Game name
|game1= arma3
|version1= 1.12


|1.12|= Game version
|gr1= Turrets
____________________________________________________________________________________________


| Selects the given weapon on specified turret. Use turret path [-1] for driver's turret. Since ver. 1.63.136864 this command supports both weapon name and muzzle name. |= Description
|descr= Selects the given weapon on the specified turret. Use turret path [-1] for the driver's turret.
____________________________________________________________________________________________


| vehicle '''selectWeaponTurret''' [weapon, turretPath] |= Syntax
|s1= vehicle [[selectWeaponTurret]] [weapon, turretPath, muzzle, firemode]


|p1= vehicle: [[Object]] |= PARAMETER1
|p1= vehicle: [[Object]]
|p2= [weapon, turretPath]: [[Array]]  |= PARAMETER2
|p3= weapon: [[String]] - weapon class name or muzzle class name |= PARAMETER3
|p4= turretPath: [[Array]] |= PARAMETER4


| [[Nothing]] |= RETURNVALUE
|p2= weapon: [[String]] - weapon class name or (since {{GVI|arma3|1.64|size= 0.75}}) muzzle class name


|p3= turretPath: [[Array]] format [[Turret Path]]


|x1= <code>MBT_Kuma [[selectWeaponTurret]] ["LMG_coax",[0]];</code>|= EXAMPLE1
|p4= muzzle: [[String]] - (Optional) muzzle name
|p4since= arma3 2.08


____________________________________________________________________________________________
|p5= firemode: [[String]] - (Optional) firemode name
|p5since= arma3 2.08


| [[removeWeaponTurret]], [[weaponState]], [[turretLocal]], [[addMagazineTurret]], [[magazinesTurret]], [[removeMagazinesTurret]], [[removeMagazineTurret]], [[weaponsTurret]], [[currentMagazineDetailTurret]], [[currentMagazineTurret]], [[currentWeaponTurret]], [[addWeaponTurret]] |= SEEALSO
|r1= [[Nothing]]


| |= MPBEHAVIOUR
|x1= <sqf>MBT_Kuma selectWeaponTurret ["LMG_coax",[0]];</sqf>
____________________________________________________________________________________________
}}


<h3 style='display:none'>Notes</h3>
|x2= <sqf>Kamysh selectWeaponTurret ["missiles_titan", [0], "missiles_titan", "topdown"];</sqf>
<dl class='command_description'>
<!-- Note Section BEGIN -->


<!-- Note Section END -->
|seealso= [[removeWeaponTurret]] [[weaponState]] [[turretLocal]] [[addMagazineTurret]] [[magazinesTurret]] [[removeMagazinesTurret]] [[removeMagazineTurret]] [[weaponsTurret]] [[currentMagazineDetailTurret]] [[currentMagazineTurret]] [[currentWeaponTurret]] [[addWeaponTurret]]
</dl>
}}


<h3 style='display:none'>Bottom Section</h3>
{{Note
[[Category:Arma_3:_New_Scripting_Commands_List|{{uc:{{PAGENAME}}}}]]
|user= Killzone_Kid
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
|timestamp= 20170213165400
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
|text= The command will treat weapon or muzzle param like a weapon first. If no such weapon is found then it will try to find muzzle with such name. For example AMV-7 Marshall APC has main gun "autocannon_40mm_CTWS" which has 2 muzzles "HE" and "AP". Default muzzle is "HE". So if you try to select weapon by the name "autocannon_40mm_CTWS" you will always get "HE" muzzle selected. However if you pass "AP" as param, it will correctly select "AP" muzzle, since no "AP" weapon exists on this turret it will continue searching for a muzzle with this name and will find it eventually.
}}

Latest revision as of 12:09, 21 December 2022

Hover & click on the images for description

Description

Description:
Selects the given weapon on the specified turret. Use turret path [-1] for the driver's turret.
Groups:
Turrets

Syntax

Syntax:
vehicle selectWeaponTurret [weapon, turretPath, muzzle, firemode]
Parameters:
vehicle: Object
weapon: String - weapon class name or (since Arma 3 logo black.png1.64) muzzle class name
turretPath: Array format Turret Path
since Arma 3 logo black.png2.08
muzzle: String - (Optional) muzzle name
since Arma 3 logo black.png2.08
firemode: String - (Optional) firemode name
Return Value:
Nothing

Examples

Example 1:
MBT_Kuma selectWeaponTurret ["LMG_coax",[0]];
Example 2:
Kamysh selectWeaponTurret ["missiles_titan", [0], "missiles_titan", "topdown"];

Additional Information

See also:
removeWeaponTurret weaponState turretLocal addMagazineTurret magazinesTurret removeMagazinesTurret removeMagazineTurret weaponsTurret currentMagazineDetailTurret currentMagazineTurret currentWeaponTurret addWeaponTurret

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
Killzone_Kid - c
Posted on Feb 13, 2017 - 16:54 (UTC)
The command will treat weapon or muzzle param like a weapon first. If no such weapon is found then it will try to find muzzle with such name. For example AMV-7 Marshall APC has main gun "autocannon_40mm_CTWS" which has 2 muzzles "HE" and "AP". Default muzzle is "HE". So if you try to select weapon by the name "autocannon_40mm_CTWS" you will always get "HE" muzzle selected. However if you pass "AP" as param, it will correctly select "AP" muzzle, since no "AP" weapon exists on this turret it will continue searching for a muzzle with this name and will find it eventually.