setWeaponReloadingTime: Difference between revisions
Jump to navigation
Jump to search
m (corrected example array) |
(Added note trying to describe the command better) |
||
Line 19: | Line 19: | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
|x1= <code>_done <nowiki>=</nowiki> _vehicle '''setWeaponReloadingTime''' [gunner, , 0.5];</code>|= EXAMPLE1 | |x1= <code>_done <nowiki>=</nowiki> _vehicle '''setWeaponReloadingTime''' [gunner (vehicle player), currentMuzzle (gunner (vehicle player)), 0.5];</code>|= EXAMPLE1 | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
Line 32: | Line 32: | ||
<dl class='command_description'> | <dl class='command_description'> | ||
<!-- Note Section BEGIN --> | <!-- Note Section BEGIN --> | ||
<dd class="notedate">Posted on January 15, 2012 | |||
<dt class="note">'''[[User:kju|kju]]''' | |||
<dd class="note">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. | |||
<dd class="note">Works also for infantry weapons - probably useful weapons with longer reload time like sniper weapons or launchers: | |||
player setWeaponReloadingTime [player,currentWeapon player,0]; | |||
<dd class="note">No idea what's point of the return value. | |||
<!-- Note Section END --> | <!-- Note Section END --> |
Revision as of 10:29, 15 January 2012
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, weaponName, reloadTime]
- Parameters:
- vehicle: Object
- [gunner, weaponName, reloadTime]: Array
- Return Value:
- Boolean
Examples
- Example 1:
_done = _vehicle setWeaponReloadingTime [gunner (vehicle player), currentMuzzle (gunner (vehicle player)), 0.5];
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
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
Categories:
- Scripting Commands
- Introduced with Arma 2: Operation Arrowhead version 1.60
- Arma 2: Operation Arrowhead: New Scripting Commands
- Arma 2: Operation Arrowhead: Scripting Commands
- Command Group: Uncategorised
- Scripting Commands ArmA2
- Scripting Commands Take On Helicopters
- ArmA 2 OA: New Scripting Commands List