selectWeaponTurret: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\| *((\[\[[a-zA-Z0-9_ |()]+\]\],? ?)+) * \}\}" to "|seealso= $1 }}")
m (Text replacement - "<dl class="command_description"> <dd class="notedate">" to "<dl class="command_description"> <dt></dt> <dd class="notedate">")
Line 25: Line 25:
<!-- CONTINUE Notes -->
<!-- CONTINUE Notes -->
<dl class="command_description">
<dl class="command_description">
<dt></dt>
<dd class="notedate">Posted on February 13, 2017 - 16:54 (UTC)</dd>
<dd class="notedate">Posted on February 13, 2017 - 16:54 (UTC)</dd>
<dt class="note">[[User:Killzone Kid|Killzone Kid]]</dt>
<dt class="note">[[User:Killzone Kid|Killzone Kid]]</dt>

Revision as of 13:38, 5 April 2021

Hover & click on the images for description

Description

Description:
Description needed
Groups:
Turrets

Syntax

Syntax:
Syntax needed
Parameters:
vehicle: Object
[weapon, turretPath]: Array
weapon: String - weapon class name or muzzle class name
turretPath: Array
Return Value:
Return value needed

Examples

Example 1:
MBT_Kuma selectWeaponTurret ["LMG_coax",[0]];

Additional Information

See also:
removeWeaponTurretweaponStateturretLocaladdMagazineTurretmagazinesTurretremoveMagazinesTurretremoveMagazineTurretweaponsTurretcurrentMagazineDetailTurretcurrentMagazineTurretcurrentWeaponTurretaddWeaponTurret

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
Posted on February 13, 2017 - 16:54 (UTC)
Killzone Kid
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.