selectWeaponTurret: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "\|s([0-9])\= ([^' ]+)'''([^' ]+)'''([^ ]*) " to "|s$1= $2$3$4 ") |
Killzone Kid (talk | contribs) No edit summary |
||
Line 8: | Line 8: | ||
|descr= 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. | |descr= 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. | ||
|s1= vehicle [[selectWeaponTurret]] [weapon, turretPath] | |s1= vehicle [[selectWeaponTurret]] [weapon, turretPath, muzzle, firemode] | ||
|p1= vehicle: [[Object]] | |p1= vehicle: [[Object]] | ||
Line 14: | Line 14: | ||
|p3= weapon: [[String]] - weapon class name or muzzle class name | |p3= weapon: [[String]] - weapon class name or muzzle class name | ||
|p4= turretPath: [[Array]] | |p4= turretPath: [[Array]] | ||
|p5= muzzle: [[String]] (Optional) - muzzle name | |||
|p5since= Arma3 2.08 | |||
|p6= firemode: [[String]] (Optional) - firemode name | |||
|p6since= Arma3 2.08 | |||
|r1= [[Nothing]] | |r1= [[Nothing]] | ||
|x1= <code>MBT_Kuma [[selectWeaponTurret]] ["LMG_coax",[0]];</code> | |x1= <code>MBT_Kuma [[selectWeaponTurret]] ["LMG_coax",[0]];</code> | ||
|x2= <code>Kamysh [[selectWeaponTurret]] ["missiles_titan", [0], "missiles_titan". "topdown"];</code> | |||
|seealso= [[removeWeaponTurret]], [[weaponState]], [[turretLocal]], [[addMagazineTurret]], [[magazinesTurret]], [[removeMagazinesTurret]], [[removeMagazineTurret]], [[weaponsTurret]], [[currentMagazineDetailTurret]], [[currentMagazineTurret]], [[currentWeaponTurret]], [[addWeaponTurret]] | |seealso= [[removeWeaponTurret]], [[weaponState]], [[turretLocal]], [[addMagazineTurret]], [[magazinesTurret]], [[removeMagazinesTurret]], [[removeMagazineTurret]], [[weaponsTurret]], [[currentMagazineDetailTurret]], [[currentMagazineTurret]], [[currentWeaponTurret]], [[addWeaponTurret]] |
Revision as of 17:21, 24 November 2021
Description
- Description:
- 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.
- Groups:
- Turrets
Syntax
- Syntax:
- vehicle selectWeaponTurret [weapon, turretPath, muzzle, firemode]
- Parameters:
- vehicle: Object
- [weapon, turretPath]: Array
- weapon: String - weapon class name or muzzle class name
- turretPath: Array
- since 2.08
- muzzle: String (Optional) - muzzle name
- since 2.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:
- 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.