weaponState: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - " |r1=[[" to " |r1= [[") |
Lou Montana (talk | contribs) m (Some wiki formatting) |
||
Line 28: | Line 28: | ||
* magazine: [[String]] | * magazine: [[String]] | ||
* ammoCount: [[Number]] | * ammoCount: [[Number]] | ||
* roundReloadPhase: [[Number]] - current ammo round reload phase (see [[weaponReloadingTime]] | * {{GVI|arma3|2.06|size= 0.75}} roundReloadPhase: [[Number]] - current ammo round reload phase (see [[weaponReloadingTime]]) | ||
* magazineReloadPhase: [[Number]] - current magazine reload phase from 1 to 0, 0 - reload complete. | * {{GVI|arma3|2.06|size= 0.75}} magazineReloadPhase: [[Number]] - current magazine reload phase from 1 to 0, 0 - reload complete. > 0 - reload in progress | ||
|s2= [[weaponState]] [vehicle, turretPath, weapon] | |s2= [[weaponState]] [vehicle, turretPath, weapon] | ||
Line 39: | Line 39: | ||
|p23= turretPath: [[Array]] | |p23= turretPath: [[Array]] | ||
|p24= weapon | |p24= weapon: [[String]] - (Optional) weapon or muzzle name | ||
|p24since= arma3 1.70 | |||
|r2= [[Array]] - in format [weapon, muzzle, firemode, magazine, ammoCount, roundReloadPhase, magazineReloadPhase], where: | |r2= [[Array]] - in format [weapon, muzzle, firemode, magazine, ammoCount, roundReloadPhase, magazineReloadPhase], where: | ||
Line 47: | Line 48: | ||
* magazine: [[String]] | * magazine: [[String]] | ||
* ammoCount: [[Number]] | * ammoCount: [[Number]] | ||
* roundReloadPhase: [[Number]] - current ammo round reload phase (see [[weaponReloadingTime]] | * {{GVI|arma3|2.06|size= 0.75}} roundReloadPhase: [[Number]] - current ammo round reload phase (see [[weaponReloadingTime]]) | ||
* magazineReloadPhase: [[Number]] - current magazine reload phase from 1 to 0, 0 - reload complete. | * {{GVI|arma3|2.06|size= 0.75}} magazineReloadPhase: [[Number]] - current magazine reload phase from 1 to 0, 0 - reload complete. > 0 - reload in progress | ||
|s3= unit [[weaponState]] weaponOrMuzzle | |s3= unit [[weaponState]] weaponOrMuzzle | ||
|s3since= arma3 2.06 | |||
|p41= unit: [[Object]] | |p41= unit: [[Object]] | ||
|p42= weaponOrMuzzle: [[String]] | |p42= weaponOrMuzzle: [[String]] | ||
|r3=[[Array]] - in format [weapon, muzzle, firemode, magazine, ammoCount, roundReloadPhase, magazineReloadPhase], where: | |r3= [[Array]] - in format [weapon, muzzle, firemode, magazine, ammoCount, roundReloadPhase, magazineReloadPhase], where: | ||
* weapon: [[String]] | * weapon: [[String]] | ||
* muzzle: [[String]] | * muzzle: [[String]] | ||
Line 62: | Line 66: | ||
* ammoCount: [[Number]] | * ammoCount: [[Number]] | ||
* roundReloadPhase: [[Number]] - current ammo round reload phase (see [[weaponReloadingTime]]) | * roundReloadPhase: [[Number]] - current ammo round reload phase (see [[weaponReloadingTime]]) | ||
* magazineReloadPhase: [[Number]] - current magazine reload phase from 1 to 0, 0 - reload complete. | * magazineReloadPhase: [[Number]] - current magazine reload phase from 1 to 0, 0 - reload complete. > 0 - reload in progress | ||
Revision as of 12:58, 13 September 2021
Description
- Description:
- Returns the given or currently selected weapon state for unit or vehicle.
- Groups:
- Weapons
Syntax 1
- Syntax:
- weaponState unit
- Parameters:
- unit: Object
- Return Value:
- Array - in format [weapon, muzzle, firemode, magazine, ammoCount, roundReloadPhase, magazineReloadPhase], where:
Syntax 2
- Syntax:
- weaponState [vehicle, turretPath, weapon]
- Parameters:
- [vehicle, turretPath, weapon]: Array
- vehicle: Object
- turretPath: Array
- since 1.70
- weapon: String - (Optional) weapon or muzzle name
- Return Value:
- Array - in format [weapon, muzzle, firemode, magazine, ammoCount, roundReloadPhase, magazineReloadPhase], where:
Syntax 3
- Syntax:
- unit weaponState weaponOrMuzzle
- Parameters:
- unit: Object
- weaponOrMuzzle: String
- Return Value:
- Array - in format [weapon, muzzle, firemode, magazine, ammoCount, roundReloadPhase, magazineReloadPhase], where:
Examples
- Example 1:
_wsPlayer = weaponState player; // ["arifle_MXC_ACO_F","arifle_MXC_ACO_F","Single","30Rnd_65x39_caseless_mag",30,0,0]
- Example 2:
_wsVehicle = weaponState [_apc, [0]]; // ["autocannon_40mm_CTWS","HE","player","60Rnd_40mm_GPR_Tracer_Red_shells",60,0,0]
- Example 3:
_wsVehicle = weaponState [_apc, [0], "AP"]; // ["autocannon_40mm_CTWS","AP","player","40Rnd_40mm_APFSDS_Tracer_Red_shells",40,0,0]
- Example 4:
_wsPlayer = player weaponState "GL_3GL_F"; // ["arifle_MX_GL_ACO_F","GL_3GL_F","Single","1Rnd_HE_Grenade_shell",1,0,0]
Additional Information
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