---
name: "setWeaponReloadingTime"
type: command
status: ok
groups: ["Weapons"]
arma3_since: "0.50"
locality: {"argument": "local", "effect": "local", "server_exec": false}
source: https://community.bistudio.com/wiki/setWeaponReloadingTime
revid: 364086
updated: 2024-05-03T19:33:29Z
---

# setWeaponReloadingTime

*Command · Weapons · Arma 3 v0.50 · introduced in Arma 2: Operation Arrowhead v1.60*

Locality: arguments **local** · effect **local**

## Description

Sets reloading **phase** on the given weapon's current ammo round.

> [!IMPORTANT]
> This command does **not** change a weapon's (e.g soldier's rifle) *magazine* reloading time but changes **the ammo reloading state** before the next round is shot.

## Syntax

```sqf
vehicle setWeaponReloadingTime [gunner, muzzleName, reloadTime]
```

**Parameters:**

- `vehicle`: [Object](../topics/Object.md)
- `gunner`: [Object](../topics/Object.md) - alive and able gunner operating the targeted turret
- `muzzleName`: [String](../topics/String.md) - turret's muzzle
- `reloadTime`: [Number](../topics/Number.md) - in range 0..1 where 0: reload complete, 1: reload started

**Returns:** [Boolean](../topics/Boolean.md) - [true](../commands/true.md) if given weapon is found

## Examples

### Example 1

```sqf
_success = _vehicle setWeaponReloadingTime [gunner vehicle player, currentMuzzle gunner vehicle player, 0.5];
```

### Example 2

Boost RPM:

```sqf
unit addEventHandler ["Fired", {
    _this # 0 setWeaponReloadingTime [_this # 0, _this # 2, 1/3];
}];
```

## See also

[weaponReloadingTime](../commands/weaponReloadingTime.md) · [weapons](../commands/weapons.md) · [magazines](../commands/magazines.md) · [selectWeapon](../commands/selectWeapon.md) · [loadMagazine](../commands/loadMagazine.md) · [weaponState](../commands/weaponState.md) · [reload](../commands/reload.md)

## Community notes

**.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.

---

**Demellion**

Note that **setWeaponReloadingTime** is only having effect on a current weapon state (loaded projectile) so since the projectile is fired the next one will be reverted to a weapon config defaults. To keep the fire rate speed changed over time, use this code:

```sqf
player addEventHandler ["FiredMan", {
    params ["", "_weapon", "_muzzle"];
    private _type = _weapon call BIS_fnc_itemType;
    private _time = -1;
    switch (_type select 1) do {
        case "SniperRifle" : {_time = 0.5};
        case "AssaultRifle" : {};
        case "Handgun" : {};
        case "Rifle" : {};
        case "SubmachineGun" : {};
        case "MachineGun" : {};
        case "Mortar" : {};
        case "GrenadeLauncher" : {};
        case "BombLauncher" : {};
        case "MissileLauncher" : {};
        case "RocketLauncher" : {};
        case "Cannon" : {};
        case "Throw" : {};
    };
    if (_time isEqualTo -1) exitWith {};
    (vehicle player) setWeaponReloadingTime [(vehicle player), _muzzle, _time];
}];
```

This [Event Handler](../topics/Event_Handlers.md) makes the gun of specific type shoot at a desired rate on each weapon state (sniper rifle will shoot 50% faster in this example). For more information about weapon kinds are there, visit [BIS_fnc_itemType](../functions/BIS_fnc_itemType.md).

<sub>Source: [BI Community Wiki — setWeaponReloadingTime](https://community.bistudio.com/wiki/setWeaponReloadingTime) (revision 364086).</sub>
