currentWeaponMode: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - " <h3 style="display:none">Notes</h3> <dl class="command_description"> <!-- Note Section BEGIN --> <!-- Note Section END --> </dl> " to "") |
Lou Montana (talk | contribs) m (Text replacement - " *\|= * " to " ") |
||
Line 14: | Line 14: | ||
| '''currentWeaponMode''' gunner |SYNTAX= | | '''currentWeaponMode''' gunner |SYNTAX= | ||
|p1= gunner: [[Object]] | |p1= gunner: [[Object]] | ||
| [[String]] |RETURNVALUE= | | [[String]] |RETURNVALUE= |
Revision as of 21:33, 17 January 2021
Description
- Description:
- Returns current weapon mode of unit's weapon. Result can be: "Single", "Burst", "FullAuto", "manual", "player"
- Groups:
- Weapons
Syntax
Examples
- Example 1:
_weaponMode = currentWeaponMode player;
- Example 2:
_weaponMode = currentWeaponMode gunner vehicle player;
Additional Information
- See also:
- SWITCHWEAPONcurrentWeapon
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
Bottom Section
- Posted on September 27, 2014 - 18:20 (UTC)
- Pierre MGI
-
- Be careful using this in script. This function returns these strings but also:
- 0 if unit is in a vehicle (pax),
- absolutely nothing if AH-99 helo driver or all weapons removed,
- "truckhorn2" if Hunter driver...
Absolutely nothing means: if you use a hint to display the returned value, you obtain absolutely no text,no black box, no error! Hint isn't displayed and there is no error in rpt file with compile preprocessFileLineNumbers. On the other hand, returned value 0 when unit is pax of a vehicle, could lead to a variable error type if your script is waiting for a string.
Categories:
- Scripting Commands
- Introduced with Arma 2: Operation Arrowhead version 1.51
- Arma 2: Operation Arrowhead: New Scripting Commands
- Arma 2: Operation Arrowhead: Scripting Commands
- Command Group: Weapons
- Arma 2: Scripting Commands
- Arma 3: Scripting Commands
- Take On Helicopters: Scripting Commands
- Arma 2: Operation Arrowhead: New Scripting Commands List