# Weapon Speed Multiplier

Grammar — Speed Multiplier of unit weapon index
FlagsNative | Function

# Arguments

  • unit — Unit
  • int — Index

Returns — fixed

native fixed UnitWeaponSpeedMultiplier(
	unit inUnit,
	int inIndex,
);

Category: Unit / Weapons

# Examples

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/HeroesLib.galaxy:2561

    for ( ; ( (auto3CC89007_ai >= 0 && lv_itWeapon <= auto3CC89007_ae) || (auto3CC89007_ai < 0 && lv_itWeapon >= auto3CC89007_ae) ) ; lv_itWeapon += auto3CC89007_ai ) {
        if ((UnitWeaponGet(lp_unit, lv_itWeapon) != null) && (UnitWeaponIsEnabled(lp_unit, lv_itWeapon) == true)) {
            return UnitWeaponSpeedMultiplier(lp_unit, lv_itWeapon);
        }

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:13855


    if ((UnitAbilityExists(lv_unit, "BroodLordHangar") == true)) {
        libCOMI_gf_SetUnitBuffMultiplier(lv_unit, (1.0 / UnitWeaponSpeedMultiplier(lv_unit, 1)), "TriggerQueueableRate", 1.01, libCOMI_ge_UnitBuffMultiplierMethod_Exponential);
    }

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:15746


    lv_cooldown = UnitWeaponPeriod(EventPlayerEffectUsedUnit(c_effectUnitCaster), 1);
    lv_multiplier = UnitWeaponSpeedMultiplier(EventPlayerEffectUsedUnit(c_effectUnitCaster), 1);
    UnitAbilityReset(EventPlayerEffectUsedUnit(c_effectUnitCaster), AbilityCommand("LocustLaunch", 0), c_spendLocationUnit);
    UnitModifyCooldown(EventPlayerEffectUsedUnit(c_effectUnitCaster), "Abil/LocustLaunch", ((lv_cooldown * lv_multiplier) / 16.0), c_cooldownOperationSet);

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:15787


    lv_cooldown = UnitAbilityGetCooldown(lv_unit, "RavagerAbathurCorrosiveBile", "Abil/RavagerAbathurCorrosiveBile");
    lv_multiplier = UnitWeaponSpeedMultiplier(lv_unit, 1);
    UnitAbilityReset(lv_unit, AbilityCommand("RavagerAbathurCorrosiveBile", 0), c_spendLocationAll);
    UnitAbilityAddCooldown(lv_unit, "RavagerAbathurCorrosiveBile", "Abil/RavagerAbathurCorrosiveBile", (lv_cooldown*lv_multiplier));