# Add Cooldown For Player

Grammar — Add inVal seconds to cooldown inCooldown for player inPlayer
FlagsNative | Action

Adds time to the specified player cooldown link.

# Arguments

  • int — Player
  • string — Cooldown
  • fixed — Value

Returns — void

native void PlayerAddCooldown(
	int inPlayer,
	string inCooldown,
	fixed inVal,
);

Category: Player / Charges And Cooldowns

# Examples

campaigns/swarmstory.sc2campaignbase.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:11192


        libNtve_gf_PlayerRemoveCooldown(1, libSwaC_gv_zSC_HeroReviveLinkKerrigan);
        PlayerAddCooldown(1, libSwaC_gv_zSC_HeroReviveLinkKerrigan, libSwaC_gv_zS_ReviveCooldownTimeKerrigan);
        TriggerEnable(libSwaC_gt_ZS_ReviveCooldownReadyKerrigan, true);
        Wait(0.5, c_timeGame);

campaigns/swarmstory.sc2campaignbase.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:11226

    UnitSetPosition(libSwaC_gv_zS_Stukov, UnitGetPosition(libSwaC_gv_zS_HeroReviverStukov), false);
    libNtve_gf_PlayerRemoveCooldown(1, libSwaC_gv_zSC_HeroReviveLinkStukov);
    PlayerAddCooldown(1, libSwaC_gv_zSC_HeroReviveLinkStukov, libSwaC_gv_zS_ReviveCooldownTimeStukov);
    TriggerEnable(libSwaC_gt_ZS_ReviveCooldownReadyStukov, true);
}

campaigns/swarmstory.sc2campaignbase.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:11242

        UnitSetPosition(libSwaC_gv_zS_Dehaka, UnitGetPosition(libSwaC_gv_zS_HeroReviverDehaka), false);
        libNtve_gf_PlayerRemoveCooldown(1, libSwaC_gv_zSC_HeroReviveLinkDehaka);
        PlayerAddCooldown(1, libSwaC_gv_zSC_HeroReviveLinkDehaka, libSwaC_gv_zS_ReviveCooldownTimeDehaka);
        TriggerEnable(libSwaC_gt_ZS_ReviveCooldownReadyDehaka, true);
    }

campaigns/void.sc2campaignbase.sc2maps/maps/campaign/void/pulnar03.sc2map/MapScript.galaxy:736

    UnitSetPosition(gv_zeratul, UnitGetPosition(gv_kerriganCocoon), false);
    libNtve_gf_PlayerRemoveCooldown(gv_pLAYER_02_DOMINION5, gv_heroReviveLinkKerrigan);
    PlayerAddCooldown(gv_pLAYER_02_DOMINION5, gv_heroReviveLinkKerrigan, 60.0);
    TriggerEnable(gt_KerriganRevivesAfterCooldown, true);
}

campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/pulnar03.sc2mapMapScript.galaxy:736

    UnitSetPosition(gv_zeratul, UnitGetPosition(gv_kerriganCocoon), false);
    libNtve_gf_PlayerRemoveCooldown(gv_pLAYER_02_DOMINION5, gv_heroReviveLinkKerrigan);
    PlayerAddCooldown(gv_pLAYER_02_DOMINION5, gv_heroReviveLinkKerrigan, 60.0);
    TriggerEnable(gt_KerriganRevivesAfterCooldown, true);
}

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


        libNtve_gf_PlayerRemoveCooldown(libVCMI_gv_pM_HeroRevivePlayer[(lv_heroType)], libVCMI_gv_pM_HeroReviveCDLink[(lv_heroType)]);
        PlayerAddCooldown(libVCMI_gv_pM_HeroRevivePlayer[(lv_heroType)], libVCMI_gv_pM_HeroReviveCDLink[(lv_heroType)], lv_reviveCooldown);
    }

mods/core.sc2modbase.sc2data/TriggerLibs/NativeLib.galaxy:3865

    // Automatic Variable Declarations
    // Implementation
    PlayerAddCooldown(lp_inPlayer, lp_inCooldown, (-1.0 * PlayerGetCooldown(lp_inPlayer, lp_inCooldown)));
}

mods/core.stormmodbase.stormdata/TriggerLibs/NativeLib.galaxy:3219

    // Automatic Variable Declarations
    // Implementation
    PlayerAddCooldown(lp_inPlayer, lp_inCooldown, (-1.0 * PlayerGetCooldown(lp_inPlayer, lp_inCooldown)));
}

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/GameDataHelperLib.galaxy:15131

    }

    PlayerAddCooldown(UnitGetOwner(EventUnit()), CatalogFieldValueGet(c_gameCatalogAbil, "LostVikingsLongboatRaidNewer", "Cost[" + IntToString(0) + "].Cooldown.Link", UnitGetOwner(EventUnit())), 15.0);
    PlayerAddCooldown(UnitGetOwner(EventUnit()), CatalogFieldValueGet(c_gameCatalogAbil, "LostVikingsPlayAgain", "Cost[" + IntToString(0) + "].Cooldown.Link", UnitGetOwner(EventUnit())), 15.0);
    return true;

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/GameDataHelperLib.galaxy:15132


    PlayerAddCooldown(UnitGetOwner(EventUnit()), CatalogFieldValueGet(c_gameCatalogAbil, "LostVikingsLongboatRaidNewer", "Cost[" + IntToString(0) + "].Cooldown.Link", UnitGetOwner(EventUnit())), 15.0);
    PlayerAddCooldown(UnitGetOwner(EventUnit()), CatalogFieldValueGet(c_gameCatalogAbil, "LostVikingsPlayAgain", "Cost[" + IntToString(0) + "].Cooldown.Link", UnitGetOwner(EventUnit())), 15.0);
    return true;
}

mods/heroesmapmods/battlegroundmapmods/volskayadata.stormmodbase.stormdata/LibVolV.galaxy:292

    SoundtrackStopCurrent(PlayerGroupSingle(lv_player), c_soundtrackCategoryAmbience, true);
    SoundtrackPlay(PlayerGroupSingle(lv_player), c_soundtrackCategoryAmbience, "Amb_2D_Volskaya_Vehicle_INT", c_soundtrackCueAny, c_soundtrackIndexAny, false);
    PlayerAddCooldown(lv_player, "Abil/LeaveVehicle", 5.0);
    if ((UnitGetType(lv_vehicle) == "VolskayaVehicle")) {
        lv_pilotIndex = libMapM_gf_GetVehicleIndexOfUnit(lv_vehicle);

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


        libNtve_gf_PlayerRemoveCooldown(libNCMI_gv_nM_HeroRevivePlayer[(lv_heroType)], libNCMI_gv_nM_HeroReviveCDLink[(lv_heroType)]);
        PlayerAddCooldown(libNCMI_gv_nM_HeroRevivePlayer[(lv_heroType)], libNCMI_gv_nM_HeroReviveCDLink[(lv_heroType)], lv_reviveCooldown);
        autoE295FE6A_val = lv_heroType;
        if (autoE295FE6A_val == libNCMI_ge_NM_HeroType_NM_HeroType_Nova) {

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

    libNtve_gf_PlayerRemoveCooldown(lp_player, lv_cooldownLink);
    UnitIssueOrder(libCOUI_gv_cU_GPUnit[lp_player], OrderTargetingPoint(lp_cmd, lv_placementTarget), c_orderQueueReplace);
    PlayerAddCooldown(lp_player, lv_cooldownLink, lv_cooldown);
    return true;
}

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

    if ((PlayerGetCooldown(libCOMI_gv_cM_ZeratulPlayer, "Abil/ProphecyVision") < lv_cooldownTime)) {
        libNtve_gf_PlayerRemoveCooldown(libCOMI_gv_cM_ZeratulPlayer, "Abil/ProphecyVision");
        PlayerAddCooldown(libCOMI_gv_cM_ZeratulPlayer, "Abil/ProphecyVision", lv_cooldownTime);
    }

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

            UnitBehaviorAdd(libCOMI_gv_cM_HeroReviver[lp_player], libCOOC_gf_CC_CommanderHeroReviverExtraBehavior(libCOOC_gf_ActiveCommanderForPlayer(lp_player)), libCOMI_gv_cM_HeroReviver[lp_player], 1);
            libNtve_gf_PlayerRemoveCooldown(lp_player, libCOOC_gf_CC_CommanderHeroReviveLink(libCOOC_gf_ActiveCommanderForPlayer(lp_player)));
            PlayerAddCooldown(lp_player, libCOOC_gf_CC_CommanderHeroReviveLink(libCOOC_gf_ActiveCommanderForPlayer(lp_player)), lv_reviveDuration);
        }
        else {

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

            libCOUI_gv_cU_HeroReviveTimer[1][lp_player] = lv_reviveDuration;
            libNtve_gf_PlayerRemoveCooldown(lp_player, libCOOC_gf_CC_CommanderHeroReviveLink(libCOOC_gf_ActiveCommanderForPlayer(lp_player)));
            PlayerAddCooldown(lp_player, libCOOC_gf_CC_CommanderHeroReviveLink(libCOOC_gf_ActiveCommanderForPlayer(lp_player)), lv_reviveDuration);
        }
        UnitIssueOrder(libCOMI_gv_cM_HeroReviver[lp_player], OrderTargetingUnit(AbilityCommand("RallyHatchery", 1), libCOMI_gv_cM_HeroReviver[lp_player]), c_orderQueueReplace);

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

    if ((libCOMI_gv_cM_DehakaBossBuildingBuilt_Glevig[lv_player] == false)) {
        libCOMI_gv_cM_DehakaBossBuildingBuilt_Glevig[lv_player] = true;
        PlayerAddCooldown(lv_player, "Abil/DehakaGlevigTopBar", 120.0);
        lv_dehakaNydusDestroyerTopBarCooldown = PlayerGetChargeRegen(lv_player, "Abil/DehakaNydusDestroyerTopBar");
        lv_dehakaNydusDestroyerTopBarCharges = PlayerGetChargeUsed(lv_player, "Abil/DehakaNydusDestroyerTopBar");

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

    if ((libCOMI_gv_cM_DehakaBossBuildingBuilt_Murvar[lv_player] == false)) {
        libCOMI_gv_cM_DehakaBossBuildingBuilt_Murvar[lv_player] = true;
        PlayerAddCooldown(lv_player, "Abil/DehakaMurvarTopBar", 60.0);
    }

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

    if ((libCOMI_gv_cM_DehakaBossBuildingBuilt_Dakrun[lv_player] == false)) {
        libCOMI_gv_cM_DehakaBossBuildingBuilt_Dakrun[lv_player] = true;
        PlayerAddCooldown(lv_player, "Abil/DehakaDakrunTopBar", 60.0);
    }

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

    UnitBehaviorSetDurationRemaining(libCOMI_gv_cM_HeroReviver[EventPlayer()], "DehakaNormalReviveTimer", lv_reviveTimer);
    UnitSetPropertyFixed(libCOMI_gv_cM_HeroReviver[EventPlayer()], c_unitPropLife, (UnitGetPropertyFixed(libCOMI_gv_cM_HeroReviver[EventPlayer()], c_unitPropLife, c_unitPropCurrent) + lv_healthAdjustment));
    PlayerAddCooldown(EventPlayer(), libCOOC_gf_CC_CommanderHeroReviveLink(libCOOC_gf_ActiveCommanderForPlayer(EventPlayer())), lv_reviveTimerAdjustment);
    return true;
}

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

        for ( ; ( (auto97938278_ai >= 0 && lv_i <= auto97938278_ae) || (auto97938278_ai < 0 && lv_i >= auto97938278_ae) ) ; lv_i += auto97938278_ai ) {
            if (((PlayerGetCooldown(lv_fenixPlayer, (libCOMI_gv_cM_Fenix_AbilCmdArray[lv_i])) <= 0.0) && ((libCOMI_gv_cM_Fenix_AbilCmdArray[lv_i]) != (libCOMI_gv_cM_Fenix_ActiveHero_Abil[lv_fenixPlayer])))) {
                PlayerAddCooldown(lv_fenixPlayer, (libCOMI_gv_cM_Fenix_AbilCmdArray[lv_i]), libCOMI_gv_cM_Fenix_SuitSwapCooldown);
            }

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

        for ( ; ( (autoCED00EAD_ai >= 0 && lv_i <= autoCED00EAD_ae) || (autoCED00EAD_ai < 0 && lv_i >= autoCED00EAD_ae) ) ; lv_i += autoCED00EAD_ai ) {
            if (((PlayerGetCooldown(lv_fenixPlayer, (libCOMI_gv_cM_Fenix_AbilCmdArray[lv_i])) <= 0.0) && ((libCOMI_gv_cM_Fenix_AbilCmdArray[lv_i]) != (libCOMI_gv_cM_Fenix_ActiveHero_Abil[lv_fenixPlayer])))) {
                PlayerAddCooldown(lv_fenixPlayer, (libCOMI_gv_cM_Fenix_AbilCmdArray[lv_i]), libCOMI_gv_cM_Fenix_SuitSwapCooldown);
            }