setWeaponReloadingTime: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(note format)
(syntax)
Line 10: Line 10:
____________________________________________________________________________________________
____________________________________________________________________________________________


| vehicle '''setWeaponReloadingTime''' [gunner, weaponName, reloadTime] |= Syntax
| vehicle '''setWeaponReloadingTime''' [gunner, muzzleName, reloadTime] |= Syntax


|p1= vehicle: [[Object]] |= Parameter 1
|p1= vehicle: [[Object]] |= Parameter 1


|p2= [gunner, weaponName, reloadTime]: [[Array]] |= Parameter 2
|p2= [gunner, muzzleName, reloadTime]: [[Array]] |= Parameter 2


| [[Boolean]] |= Return value
| [[Boolean]] - [[true]] on success|= Return value
____________________________________________________________________________________________
____________________________________________________________________________________________



Revision as of 14:58, 28 June 2015

Hover & click on the images for description

Description

Description:
Sets states and/or makes an action of/on weapon. Reload time is between 0 and 1 inclusive, where 1 is 100% of maximum reloading time.
Groups:
Uncategorised

Syntax

Syntax:
vehicle setWeaponReloadingTime [gunner, muzzleName, reloadTime]
Parameters:
vehicle: Object
[gunner, muzzleName, reloadTime]: Array
Return Value:
Boolean - true on success

Examples

Example 1:
_done = _vehicle setWeaponReloadingTime [gunner (vehicle player), currentMuzzle (gunner (vehicle player)), 0.5];

Additional Information

See also:
weaponsmagazinesselectWeaponloadMagazineweaponState

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

Notes

Posted on January 15, 2012
kju
The description is confusing to me. What the command essential does is to set the reloading state/time of the given weapon. For example you can fire a missile, and make the weapon available to fire again instantly if you apply 0. Or you can delay or stop the reload event indefinitely. The 0-1 range is a percentage - the reload time is taken from the weapons's config value (either reloadTime or magazineReloadTime - not sure). The effect is one time only each - it does not modify the weapon's general reload time.

Works also for infantry weapons - probably useful weapons with longer reload time like sniper weapons or launchers: player setWeaponReloadingTime [player,currentWeapon player,0];

No idea what's point of the return value.

Bottom Section