# Remove Cooldown For Unit Ability

Grammar — Clear remaining time on cooldown inCooldown on ability inAbil on unit inUnit
FlagsAction

Clears the specified ability cooldown link.

# Arguments

  • unit — Unit
  • string<gamelink::Abil> — Ability
  • string<cooldown> — Cooldown

Returns — void

void libNtve_gf_UnitAbilityRemoveCooldown(
	unit lp_inUnit,
	string lp_inAbil,
	string lp_inCooldown,
);

Category: Unit / Charges And Cooldowns

# Examples

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tvalerian03.sc2map/MapScript.galaxy:5356

    Wait(0.1, c_timeReal);
    UnitAbilitySpend(gv_artifact, AbilityCommand("EnergyNova", 0), c_spendLocationAll);
    libNtve_gf_UnitAbilityRemoveCooldown(gv_artifact, "EnergyNova", "Abil/Supernova");
    UnitAbilityAddCooldown(gv_artifact, "EnergyNova", "Abil/Supernova", 184.0);
    gv_energyNovasUsed = 0;

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tvalerian03.sc2mapMapScript.galaxy:5356

    Wait(0.1, c_timeReal);
    UnitAbilitySpend(gv_artifact, AbilityCommand("EnergyNova", 0), c_spendLocationAll);
    libNtve_gf_UnitAbilityRemoveCooldown(gv_artifact, "EnergyNova", "Abil/Supernova");
    UnitAbilityAddCooldown(gv_artifact, "EnergyNova", "Abil/Supernova", 184.0);
    gv_energyNovasUsed = 0;

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignMissionLib.galaxy:4799

    libVCMI_gf_PM_SoATargetingCleanupActorsAndUnits();
    if (((libVCMI_gv_pM_SoATargetingChargesSpent == 0) || (libVCMI_gf_PM_SoATargetingPauseEnabled() == true))) {
        libNtve_gf_UnitAbilityRemoveCooldown(libVCMI_gv_sOA_CasterUnit, libVCMI_gv_pM_SoATargetingActivateAbility, libVCMI_gv_pM_SoATargetingCooldown);
        UnitSetPropertyFixed(libVCMI_gv_sOA_CasterUnit, c_unitPropEnergy, (UnitGetPropertyFixed(libVCMI_gv_sOA_CasterUnit, c_unitPropEnergy, c_unitPropCurrent) + libNtve_gf_CostOfAbility(libVCMI_gv_pM_SoATargetingActivateAbility, "Energy")));
    }

mods/heroes.stormmodbase.stormmaps/maps/heroes/singleplayermaps/startingexperience/tutorialveteran.stormmap/MapScript.galaxy:6814


        if ((libNtve_gf_UnitInRegion(libStEx_gv_hERO_EnemyFalstad, RegionFromId(6)) == true)) {
            libNtve_gf_UnitAbilityRemoveCooldown(libStEx_gv_hERO_EnemyFalstad, "FalstadFlight", "Abil/FalstadFlight");
            autoFE29F895_val = gv__2B_CurrentLane;
            if (autoFE29F895_val == 1) {

mods/heroes.stormmod/base.stormmaps/maps/heroes/singleplayermaps/startingexperience/tutorialveteran.stormmapMapScript.galaxy:6814


        if ((libNtve_gf_UnitInRegion(libStEx_gv_hERO_EnemyFalstad, RegionFromId(6)) == true)) {
            libNtve_gf_UnitAbilityRemoveCooldown(libStEx_gv_hERO_EnemyFalstad, "FalstadFlight", "Abil/FalstadFlight");
            autoFE29F895_val = gv__2B_CurrentLane;
            if (autoFE29F895_val == 1) {

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/MapMechanicsLib.galaxy:7483

    }
    libGame_gf_SendEventMapObjectiveCapturedByUnit(EventPlayerEffectUsedUnit(c_effectUnitCaster));
    libNtve_gf_UnitAbilityRemoveCooldown(libMapM_gv_mMGardensDragonStatue, "LeaveVehicle", "Abil/LeaveVehicle");
    UnitAbilityAddCooldown(libMapM_gv_mMGardensDragonStatue, "LeaveVehicle", "Abil/LeaveVehicle", 5.0);
    TimerPause(libMapM_gv_mMGardensDragonDragonStatueActiveReminderTimer, true);

mods/missionpacks/novacampaign.sc2modbase.sc2data/LibNCMI.galaxy:1937

        UnitGroupLoopEnd();
        if ((lv_trainingNukeFound == true)) {
            libNtve_gf_UnitAbilityRemoveCooldown(libNCMI_gv_nM_NovaHeroUnit, "NovaNukeTimer", "Abil/NovaNukeTimer");
            UnitAbilitySpendExplicit(libNCMI_gv_nM_NovaHeroUnit, AbilityCommand("NovaNukeTimer", 0), c_spendLocationAbility, 1.0, 1.0, 1.0, 1.0);
            UnitAbilityAddCooldown(libNCMI_gv_nM_NovaHeroUnit, "NovaNukeTimer", "Abil/NovaNukeTimer", (lv_lowestResearchTime - 300.0));

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


    if ((libCOMI_gv_cM_SoATargetingChargesSpent[lp_player] == 0) && (libCOMI_gv_cM_SoATargetingUnrefundableStageEntered[lp_player] == false)) {
        libNtve_gf_UnitAbilityRemoveCooldown(libCOMI_gv_cM_SoACasterUnit[lp_player], libCOMI_gv_cM_SoATargetingActivateAbility[lp_player], libCOMI_gv_cM_SoATargetingCooldown[lp_player]);
        lv_costField = ("Cost[0].Vital[" + "Energy" + "]");
        lv_cost = CatalogFieldValueGet(c_gameCatalogAbil, libCOMI_gv_cM_SoATargetingActivateAbility[lp_player], (lv_costField), lp_player);

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

    else if (auto864A12EB_val == "Artanis") {
        libNtve_gf_UnitRemoveCooldown(libCOMI_gv_cM_GlobalCasterUnit[EventPlayer()], "SOACaster");
        libNtve_gf_UnitAbilityRemoveCooldown(libCOMI_gv_cM_GlobalCasterUnit[EventPlayer()], "SoASuperShield", "Abil/SoASuperShield");
        libNtve_gf_UnitAbilityRemoveCooldown(libCOMI_gv_cM_GlobalCasterUnit[EventPlayer()], "SOAOrbitalStrikeActivate", "Abil/SOAOrbitalStrikeActivate");
        libNtve_gf_UnitAbilityRemoveCooldown(libCOMI_gv_cM_GlobalCasterUnit[EventPlayer()], "SOAStrafeAttack", "Abil/SOAStrafeAttack");

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

        libNtve_gf_UnitRemoveCooldown(libCOMI_gv_cM_GlobalCasterUnit[EventPlayer()], "SOACaster");
        libNtve_gf_UnitAbilityRemoveCooldown(libCOMI_gv_cM_GlobalCasterUnit[EventPlayer()], "SoASuperShield", "Abil/SoASuperShield");
        libNtve_gf_UnitAbilityRemoveCooldown(libCOMI_gv_cM_GlobalCasterUnit[EventPlayer()], "SOAOrbitalStrikeActivate", "Abil/SOAOrbitalStrikeActivate");
        libNtve_gf_UnitAbilityRemoveCooldown(libCOMI_gv_cM_GlobalCasterUnit[EventPlayer()], "SOAStrafeAttack", "Abil/SOAStrafeAttack");
    }

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

        libNtve_gf_UnitAbilityRemoveCooldown(libCOMI_gv_cM_GlobalCasterUnit[EventPlayer()], "SoASuperShield", "Abil/SoASuperShield");
        libNtve_gf_UnitAbilityRemoveCooldown(libCOMI_gv_cM_GlobalCasterUnit[EventPlayer()], "SOAOrbitalStrikeActivate", "Abil/SOAOrbitalStrikeActivate");
        libNtve_gf_UnitAbilityRemoveCooldown(libCOMI_gv_cM_GlobalCasterUnit[EventPlayer()], "SOAStrafeAttack", "Abil/SOAStrafeAttack");
    }
    else if (auto864A12EB_val == "Vorazun") {

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

    }
    else if (auto864A12EB_val == "Vorazun") {
        libNtve_gf_UnitAbilityRemoveCooldown(libCOMI_gv_cM_GlobalCasterUnit[EventPlayer()], "SOADarkPylon", "Abil/SOADarkPylon");
        libNtve_gf_UnitAbilityRemoveCooldown(libCOMI_gv_cM_GlobalCasterUnit[EventPlayer()], "SOAShadowGuardCalldown", "Abil/SOAShadowGuardCalldown");
        libNtve_gf_UnitAbilityRemoveCooldown(libCOMI_gv_cM_GlobalCasterUnit[EventPlayer()], "SOATimeFreeze", "Abil/SOATimeFreeze");

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

    else if (auto864A12EB_val == "Vorazun") {
        libNtve_gf_UnitAbilityRemoveCooldown(libCOMI_gv_cM_GlobalCasterUnit[EventPlayer()], "SOADarkPylon", "Abil/SOADarkPylon");
        libNtve_gf_UnitAbilityRemoveCooldown(libCOMI_gv_cM_GlobalCasterUnit[EventPlayer()], "SOAShadowGuardCalldown", "Abil/SOAShadowGuardCalldown");
        libNtve_gf_UnitAbilityRemoveCooldown(libCOMI_gv_cM_GlobalCasterUnit[EventPlayer()], "SOATimeFreeze", "Abil/SOATimeFreeze");
    }

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

        libNtve_gf_UnitAbilityRemoveCooldown(libCOMI_gv_cM_GlobalCasterUnit[EventPlayer()], "SOADarkPylon", "Abil/SOADarkPylon");
        libNtve_gf_UnitAbilityRemoveCooldown(libCOMI_gv_cM_GlobalCasterUnit[EventPlayer()], "SOAShadowGuardCalldown", "Abil/SOAShadowGuardCalldown");
        libNtve_gf_UnitAbilityRemoveCooldown(libCOMI_gv_cM_GlobalCasterUnit[EventPlayer()], "SOATimeFreeze", "Abil/SOATimeFreeze");
    }
    else if (auto864A12EB_val == "Karax") {

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

    }
    else if (auto864A12EB_val == "Karax") {
        libNtve_gf_UnitAbilityRemoveCooldown(libCOMI_gv_cM_GlobalCasterUnit[EventPlayer()], "SOAThermalLanceActivate", "Abil/SOAThermalLanceActivate");
        libNtve_gf_UnitAbilityRemoveCooldown(libCOMI_gv_cM_GlobalCasterUnit[EventPlayer()], "SOAMapWideChrono", "Abil/SOAMapWideChrono");
        libNtve_gf_UnitAbilityRemoveCooldown(libCOMI_gv_cM_GlobalCasterUnit[EventPlayer()], "SOAPurifierBeam", "Abil/SOAPurifierBeam");

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

    else if (auto864A12EB_val == "Karax") {
        libNtve_gf_UnitAbilityRemoveCooldown(libCOMI_gv_cM_GlobalCasterUnit[EventPlayer()], "SOAThermalLanceActivate", "Abil/SOAThermalLanceActivate");
        libNtve_gf_UnitAbilityRemoveCooldown(libCOMI_gv_cM_GlobalCasterUnit[EventPlayer()], "SOAMapWideChrono", "Abil/SOAMapWideChrono");
        libNtve_gf_UnitAbilityRemoveCooldown(libCOMI_gv_cM_GlobalCasterUnit[EventPlayer()], "SOAPurifierBeam", "Abil/SOAPurifierBeam");
    }

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

        libNtve_gf_UnitAbilityRemoveCooldown(libCOMI_gv_cM_GlobalCasterUnit[EventPlayer()], "SOAThermalLanceActivate", "Abil/SOAThermalLanceActivate");
        libNtve_gf_UnitAbilityRemoveCooldown(libCOMI_gv_cM_GlobalCasterUnit[EventPlayer()], "SOAMapWideChrono", "Abil/SOAMapWideChrono");
        libNtve_gf_UnitAbilityRemoveCooldown(libCOMI_gv_cM_GlobalCasterUnit[EventPlayer()], "SOAPurifierBeam", "Abil/SOAPurifierBeam");
    }
    else if (auto864A12EB_val == "Raynor") {