Warning: file_put_contents(/ff_84f91477d12eeae0b62a6e585c01609879ddec94bab4a4a9.php): failed to open stream: Permission denied in /home/ofpecsav/public_html/forum/Sources/Subs-ForumFirewall.php on line 1619
selectWeapon - OFPEC Scripting Command Reference | OFPEC The Editing Center

unit selectWeapon weapon

Operand types

unit: Object
weapon: String

Type of returned value

Description

Select given weapon.
Note: For weapons that have more than one muzzle, you have to input the muzzlename and not the weaponName.
The only weapons that have muzzlenames seem to be rifles with grenade launchers, handgrenades, smokeshells and satchels.

In all other cases the weaponName must be used.
Fortunately, in OFP, in most cases, both names are the same. But check.
In ArmA the weaponNames and muzzleNames are different.

For weaponName/muzzleName values see OFPWeapons or ArmAWeapons.

Used In

OFP/ArmA

Example

soldier1 selectWeapon "LAWLauncher"

Advertisement