weaponState: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "{{Command " to "{{RV|type=command ")
m (Text replacement - " *\| *PARAMETER[0-9]{1,3} *= * " to " ")
Line 27: Line 27:
|s2= [[weaponState]] [vehicle, turretPath, weapon]
|s2= [[weaponState]] [vehicle, turretPath, weapon]


|p21=  [vehicle, turretPath, weapon]: [[Array]] |PARAMETER21=
|p21=  [vehicle, turretPath, weapon]: [[Array]]


|p22= vehicle: [[Object]] |PARAMETER22=
|p22= vehicle: [[Object]]


|p23= turretPath: [[Array]] |PARAMETER23=
|p23= turretPath: [[Array]]


|p24= weapon (Optional): [[String]] (since Arma 3 v1.69.140397) - weapon or muzzle name |PARAMETER24=
|p24= weapon (Optional): [[String]] (since Arma 3 v1.69.140397) - weapon or muzzle name


|r2= [[Array]] - in format [weapon, muzzle, firemode, magazine, ammoCount], where:
|r2= [[Array]] - in format [weapon, muzzle, firemode, magazine, ammoCount], where:

Revision as of 18:43, 29 January 2021

Hover & click on the images for description

Description

Description:
Description needed
Groups:
Weapons

Syntax

Syntax:
Syntax needed
Parameters:
unit: Object
Return Value:
Return value needed

Alternative Syntax

Syntax:
weaponState [vehicle, turretPath, weapon]
Parameters:
[vehicle, turretPath, weapon]: Array
vehicle: Object
turretPath: Array
weapon (Optional): String (since Arma 3 v1.69.140397) - weapon or muzzle name
Return Value:
Array - in format [weapon, muzzle, firemode, magazine, ammoCount], where:

Examples

Example 1:
_wsPlayer = weaponState player; // ["arifle_MXC_ACO_F","arifle_MXC_ACO_F","Single","30Rnd_65x39_caseless_mag",30]
Example 2:
_wsVehicle = weaponState [_apc, [0]]; // ["autocannon_40mm_CTWS","HE","player","60Rnd_40mm_GPR_Tracer_Red_shells",60]
Example 3:
_wsVehicle = weaponState [_apc, [0], "AP"]; // ["autocannon_40mm_CTWS","AP","player","40Rnd_40mm_APFSDS_Tracer_Red_shells",40]

Additional Information

See also:
See also needed

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