primaryWeapon: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
mNo edit summary
Line 1: Line 1:
[[Category:Scripting Commands|PRIMARYWEAPON]]
[[Category:Scripting Commands|PRIMARYWEAPON]]
[[Category:Scripting Commands OFP 1.97|PRIMARYWEAPON]]
[[Category:Scripting Commands OFP 1.96|PRIMARYWEAPON]]
[[Category:Scripting Commands ArmA|PRIMARYWEAPON]]
[[Category:Scripting Commands ArmA|PRIMARYWEAPON]]



Revision as of 20:58, 1 June 2006


primaryWeapon vehicle


Operand types:

vehicle: Object

Type of returned value:

String

Compatibility:

Added in version 1.75

Description:

Returns name of vehicle's primary weapon (empty string if none).


Example:

pWeap = primaryWeapon player


Comments:

primaryWeapon tells you what weapon the unit has irrespective of the status of the weapon. For example a unit that has an M16 on his back will still report an M16 as its primary weapon. There is no command that will enable you to detect the active weapon.