# Cooldown For Unit
Grammar — Cooldown of cooldown inCooldown on unit inUnit
Flags —Native
|Function
Returns the cooldown time for the specified unit cooldown link.
# Arguments
unit
— Unitstring
<cooldown> — Cooldown
Returns — fixed
native fixed UnitGetCooldown(
unit inUnit,
string inCooldown,
);
# Related
Category: Unit / Charges And Cooldowns
- Add Charge Remaining Regen Time For Unit Behavior —
void
— UnitBehaviorAddChargeRegenRemaining - Add Charge Remaining Regen Time For Unit Ability —
void
— UnitAbilityAddChargeRegenRemaining - Add Charge Remaining Regen Time For Unit —
void
— UnitAddChargeRegenRemaining - Add Charge Full Regen Time For Unit Behavior —
void
— UnitBehaviorAddChargeRegenFull - Add Charge Full Regen Time For Unit Ability —
void
— UnitAbilityAddChargeRegenFull - Add Charge Full Regen Time For Unit —
void
— UnitAddChargeRegenFull - Add Charge Used For Unit Behavior —
void
— UnitBehaviorAddChargeUsed - Add Charge Used For Unit Ability —
void
— UnitAbilityAddChargeUsed - Add Charge Used For Unit —
void
— UnitAddChargeUsed - Remove Charge Used For Unit Behavior —
void
— libNtve_gf_UnitBehaviorRemoveChargeUsed - Remove Charge Used For Unit Ability —
void
— libNtve_gf_UnitAbilityRemoveChargeUsed - Remove Charge Used For Unit —
void
— libNtve_gf_UnitRemoveChargeUsed - Charge Regen Remaining For Unit Behavior —
fixed
— UnitBehaviorGetChargeRegen - Charge Regen Remaining For Unit Ability —
fixed
— UnitAbilityGetChargeRegen - Charge Regen Remaining For Unit —
fixed
— UnitGetChargeRegen - Charge Regen Full For Unit Behavior —
fixed
— UnitBehaviorGetChargeRegenFull - Charge Regen Full For Unit Ability —
fixed
— UnitAbilityGetChargeRegenFull - Charge Regen Full For Unit —
fixed
— UnitGetChargeRegenFull - Charge Used For Unit Behavior —
fixed
— UnitBehaviorGetChargeUsed - Charge Used For Unit Ability —
fixed
— UnitAbilityGetChargeUsed - Charge Used For Unit —
fixed
— UnitGetChargeUsed - Add Cooldown For Unit Behavior —
void
— UnitBehaviorAddCooldown - Add Cooldown For Unit Ability —
void
— UnitAbilityAddCooldown - Modify Cooldown For Unit —
void
— UnitModifyCooldown - Clear Cooldowns For Unit —
void
— UnitClearCooldowns - Remove Cooldown For Unit Behavior —
void
— libNtve_gf_UnitBehaviorRemoveCooldown - Remove Cooldown For Unit Ability —
void
— libNtve_gf_UnitAbilityRemoveCooldown - Remove Cooldown For Unit —
void
— libNtve_gf_UnitRemoveCooldown - Cooldown For Unit Behavior —
fixed
— UnitBehaviorGetCooldown - Cooldown For Unit Abilty —
fixed
— UnitAbilityGetCooldown - Cooldown For Unit —
fixed
— UnitGetCooldown - Activate Ability Cooldowns —
void
— UnitAbilitySpendExplicit - Reset Ability Cooldowns —
void
— UnitAbilityReset - Ability Charge Info For Unit —
fixed
— UnitAbilityChargeInfo
# Examples
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/AILib.galaxy:656
if ((libAIAI_gf_DefendersAreFighting(lp_defenderAIIndex) == true) && ((libAIAI_gv_defenderAI[lp_defenderAIIndex].lv_fightStartTime + libAIAI_gv_aIDefenderMinTimeBeforeCasting) < TimerGetElapsed(libGame_gv_gameTimer))) {
if ((UnitGetType(lv_creepUnit) == "MercDefenderRangedMage")) {
if ((UnitGetCooldown(lv_creepUnit, "Abil/KnightMagicVolley") <= 0.0) && (UnitIsValid(lv_currentOrderTarget) == true) && (libNtve_gf_UnitIsVisibleToPlayer(lv_currentOrderTarget, UnitGetOwner(lv_creepUnit)) == true) && (DistanceBetweenPoints(UnitGetPosition(lv_creepUnit), UnitGetPosition(lv_currentOrderTarget)) <= 7.0)) {
UnitIssueOrder(lv_creepUnit, OrderTargetingUnit(AbilityCommand("KnightMagicVolley", 0), lv_currentOrderTarget), c_orderQueueReplace);
libAIAI_gv_defenderAICreepNeedsNewOrder = false;
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/AILib.galaxy:664
else {
if (((UnitGetType(lv_creepUnit) == "JungleGraveGolemDefender") || (UnitGetType(lv_creepUnit) == "UnderworldBoss") || (UnitGetType(lv_creepUnit) == "JunglePlantHorror"))) {
if ((UnitGetCooldown(lv_creepUnit, "Abil/UnderworldBossStun") <= 0.0)) {
lv_enemyGroup = libNtve_gf_UnitsInRegionWithAllianceToPlayerMatchingCondition(null, "", "", UnitGetOwner(lv_creepUnit), c_unitAllianceEnemy, RegionCircle(UnitGetPosition(lv_creepUnit), 5.0), UnitFilter((1 << c_targetFilterHeroic) | (1 << c_targetFilterVisible), 0, (1 << c_targetFilterPlayer) | (1 << c_targetFilterAlly) | (1 << c_targetFilterStructure) | (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
if ((UnitGroupCount(lv_enemyGroup, c_unitCountAlive) >= 1)) {
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/AILib.galaxy:683
lv_enemyGroup = libNtve_gf_UnitsInRegionWithAllianceToPlayerMatchingCondition(null, "", "", UnitGetOwner(lv_creepUnit), c_unitAllianceEnemy, RegionCircle(UnitGetPosition(lv_creepUnit), 8.0), UnitFilter((1 << c_targetFilterHeroic) | (1 << c_targetFilterVisible), 0, (1 << c_targetFilterPlayer) | (1 << c_targetFilterAlly) | (1 << c_targetFilterStructure) | (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
if ((UnitGetCooldown(lv_creepUnit, "Abil/UnderworldBossRoots") <= 0.0) && (UnitGroupCount(lv_enemyGroup, c_unitCountAlive) >= 1)) {
auto0C71B695_g = lv_enemyGroup;
auto0C71B695_u = UnitGroupCount(auto0C71B695_g, c_unitCountAll);
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameDataHelperLib.galaxy:5987
UnitBehaviorRemove(libGDHL_gf_AbathurSymbioteUnit(), "AbathurSymbioteSuppressAttack", 1);
UnitBehaviorAdd(libGDHL_gf_AbathurSymbioteUnit(), "AbathurMonstrosityDeepTunnelCarry", libGDHL_gf_AbathurSymbioteUnit(), 1);
lv_deepTunnelCD = UnitGetCooldown(libGDHL_gf_AbathurSymbioteTarget(), "Abil/AbathurMonstrosityDeepTunnel");
UnitModifyCooldown(libGDHL_gf_AbathurSymbioteUnit(), "Abil/AbathurMonstrosityDeepTunnelRedirect", lv_deepTunnelCD, c_cooldownOperationSet);
return true;
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameDataHelperLib.galaxy:17082
SoundPlayForPlayer(SoundLink("Murky_RespawnEgg_Death_Vox", -1), lv_eggOwnerPlayer, PlayerGroupSingle(lv_eggOwnerPlayer), 100.0, 0.0);
libGDHL_gf_UIHeroSpecificStatusFrameUpdateMurkyEggStatus(UnitGetOwner(EventUnit()));
lv_cooldownOnEgg = UnitGetCooldown(libGame_gv_players[lv_eggOwnerPlayer].lv_heroUnit, CatalogFieldValueGet(c_gameCatalogAbil, "MurkyRespawnEgg", "Cost[" + IntToString(0) + "].Cooldown.Link", UnitGetOwner(libGame_gv_players[lv_eggOwnerPlayer].lv_heroUnit)));
UnitCreateEffectUnit(lv_murkyHeroUnit, "RespawnEggCancelOrder", lv_murkyHeroUnit);
if ((lv_cooldownOnEgg <= libGDHL_gv_mURKY_BAL_EGG_DEATH_cd)) {
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/HeroesLib.galaxy:2862
// Implementation
lv_cooldownLink = CatalogFieldValueGet(c_gameCatalogAbil, lp_ability, "Cost[" + IntToString(0) + "].Cooldown.Link", c_playerAny);
lv_time = UnitGetCooldown(lp_unit, lv_cooldownLink);
if ((lv_time > 0.0)) {
return true;
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/UILib.galaxy:6857
}
else {
lv_cooldownTime = UnitGetCooldown(lp_unit, lv_cooldownLink);
}
}
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/UILib.galaxy:6861
}
else {
lv_cooldownTime = UnitGetCooldown(lp_unit, lv_cooldownLink);
}
}
mods/heromods/auriel.stormmod — base.stormdata/LibHAUR.galaxy:263
if ((UnitGetType(libGame_gv_players[lp_deadPlayer].lv_heroUnit) != "HeroLostVikingsController")) {
if ((libCore_gf_IsAbilityOnCooldown(libGame_gv_players[lp_aurielPlayer].lv_heroUnit, "AurielResurrect") == true)) {
TextExpressionSetToken("Param/Expression/lib_HAUR_8881BDD0", "A", FixedToText(UnitGetCooldown(libGame_gv_players[lp_aurielPlayer].lv_heroUnit, CatalogFieldValueGet(c_gameCatalogAbil, "AurielResurrect", "Cost[" + IntToString(0) + "].Cooldown.Link", lp_aurielPlayer)), 0));
TextExpressionSetToken("Param/Expression/lib_HAUR_8881BDD0", "B", FixedToText(TimerGetRemaining(libGame_gv_players[lp_deadPlayer].lv_respawnTimer), 0));
TextTagCreate(TextExpressionAssemble("Param/Expression/lib_HAUR_8881BDD0"), 36, UnitGetPosition(libHAUR_gv_heroAurielResurrectSpirit[lp_deadPlayer]), 4.0, true, false, PlayerGroupSingle(lp_deadPlayer));
mods/heromods/auriel.stormmod — base.stormdata/LibHAUR.galaxy:276
if ((lp_vikingNumber == 1)) {
if ((libCore_gf_IsAbilityOnCooldown(libGame_gv_players[lp_aurielPlayer].lv_heroUnit, "AurielResurrect") == true)) {
TextExpressionSetToken("Param/Expression/lib_HAUR_52754345", "A", FixedToText(UnitGetCooldown(libGame_gv_players[lp_aurielPlayer].lv_heroUnit, CatalogFieldValueGet(c_gameCatalogAbil, "AurielResurrect", "Cost[" + IntToString(0) + "].Cooldown.Link", lp_aurielPlayer)), 0));
TextExpressionSetToken("Param/Expression/lib_HAUR_52754345", "B", FixedToText(TimerGetRemaining(libGDHL_gv_lostVikingsPlayer[lp_deadPlayer].lv_baleogDeathTimer), 0));
TextTagCreate(TextExpressionAssemble("Param/Expression/lib_HAUR_52754345"), 36, UnitGetPosition(libHAUR_gv_heroAurielResurrectSpirit[lp_deadPlayer]), 4.0, true, false, PlayerGroupSingle(lp_deadPlayer));
mods/heromods/auriel.stormmod — base.stormdata/LibHAUR.galaxy:289
if ((lp_vikingNumber == 2)) {
if ((libCore_gf_IsAbilityOnCooldown(libGame_gv_players[lp_aurielPlayer].lv_heroUnit, "AurielResurrect") == true)) {
TextExpressionSetToken("Param/Expression/lib_HAUR_2C638B40", "A", FixedToText(UnitGetCooldown(libGame_gv_players[lp_aurielPlayer].lv_heroUnit, CatalogFieldValueGet(c_gameCatalogAbil, "AurielResurrect", "Cost[" + IntToString(0) + "].Cooldown.Link", lp_aurielPlayer)), 0));
TextExpressionSetToken("Param/Expression/lib_HAUR_2C638B40", "B", FixedToText(TimerGetRemaining(libGDHL_gv_lostVikingsPlayer[lp_deadPlayer].lv_erikDeathTimer), 0));
TextTagCreate(TextExpressionAssemble("Param/Expression/lib_HAUR_2C638B40"), 36, UnitGetPosition(libHAUR_gv_heroAurielResurrectSpirit[lp_deadPlayer]), 4.0, true, false, PlayerGroupSingle(lp_deadPlayer));
mods/heromods/auriel.stormmod — base.stormdata/LibHAUR.galaxy:302
if ((lp_vikingNumber == 3)) {
if ((libCore_gf_IsAbilityOnCooldown(libGame_gv_players[lp_aurielPlayer].lv_heroUnit, "AurielResurrect") == true)) {
TextExpressionSetToken("Param/Expression/lib_HAUR_33DF3109", "A", FixedToText(UnitGetCooldown(libGame_gv_players[lp_aurielPlayer].lv_heroUnit, CatalogFieldValueGet(c_gameCatalogAbil, "AurielResurrect", "Cost[" + IntToString(0) + "].Cooldown.Link", lp_aurielPlayer)), 0));
TextExpressionSetToken("Param/Expression/lib_HAUR_33DF3109", "B", FixedToText(TimerGetRemaining(libGDHL_gv_lostVikingsPlayer[lp_deadPlayer].lv_olafDeathTimer), 0));
TextTagCreate(TextExpressionAssemble("Param/Expression/lib_HAUR_33DF3109"), 36, UnitGetPosition(libHAUR_gv_heroAurielResurrectSpirit[lp_deadPlayer]), 4.0, true, false, PlayerGroupSingle(lp_deadPlayer));
mods/heromods/chogall.stormmod — base.stormdata/LibHCHO.galaxy:1229
lv_choGallPairsTeam = libGame_gf_TeamNumberOfPlayer(UnitGetOwner(EventPlayerEffectUsedUnit(c_effectUnitCaster)));
lv_cooldownLink = CatalogFieldValueGet(c_gameCatalogAbil, "ChoRuneBomb", "Cost[" + IntToString(0) + "].Cooldown.Link", libGDHL_gv_chogallPairs[lv_choGallPairsTeam].lv_choPlayer);
lv_time = UnitGetCooldown(libGDHL_gv_chogallPairs[lv_choGallPairsTeam].lv_choUnit, lv_cooldownLink);
lv_cooldownLink2 = CatalogFieldValueGet(c_gameCatalogAbil, "GallRunicBlast", "Cost[" + IntToString(0) + "].Cooldown.Link", libGDHL_gv_chogallPairs[lv_choGallPairsTeam].lv_gallPlayer);
}
mods/heromods/samuro.stormmod — base.stormdata/LibHSAM.galaxy:1063
lv_abilLink = libGame_gv_players[lv_samuroPlayer].lv_heroData.lv_abilities[lv_itAbility].lv_ability;
lv_cooldownLink = CatalogFieldValueGet(c_gameCatalogAbil, lv_abilLink, "Cost[" + IntToString(0) + "].Cooldown.Link", lv_samuroPlayer);
UnitModifyCooldown(lv_mirrorImage, lv_cooldownLink, UnitGetCooldown(lv_samuro, lv_cooldownLink), c_cooldownOperationSet);
}
if ((EventUnitCreatedAbil() == "SamuroWindwalk")) {
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:14021
// Conditions
if (testConds) {
if (!((UnitGetCooldown(lv_caster, "Abil/ObserverTargetLock") == 0.0))) {
return false;
}
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:14068
// Conditions
if (testConds) {
if (!((UnitGetCooldown(lv_caster, "Abil/ObserverTargetLock") == 0.0))) {
return false;
}
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMU.galaxy:2022
AISetFilterAlliance(lv_enemyNearbyFilter, c_playerGroupEnemy);
lv_enemiesNearby = AIGetFilterGroup(lv_enemyNearbyFilter, lp_nearByUnits);
if ((UnitGetCooldown(lp_aIUnit, "MutatorAmonDehakaHeal") <= 0.0) && ((UnitGetPropertyFixed(lp_aIUnit, c_unitPropLifeMax, c_unitPropCurrent) - UnitGetPropertyFixed(lp_aIUnit, c_unitPropLife, c_unitPropCurrent)) > 150.0)) {
libNtve_gf_AICast(lp_aIUnit, Order(AbilityCommand("MutatorAmonDehakaHeal", 0)));
return ;
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMU.galaxy:2031
}
if ((UnitGetCooldown(lp_aIUnit, "MutatorAmonDehakaMirrorImage") <= 0.0)) {
libNtve_gf_AICast(lp_aIUnit, OrderTargetingPoint(AbilityCommand("MutatorAmonDehakaMirrorImage", 0), PointWithOffsetPolar(UnitGetPosition(lp_aIUnit), 5.0, AngleBetweenPoints(UnitGetPosition(lp_aIUnit), UnitGroupCenterOfGroup(lv_enemiesNearby)))));
return ;
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMU.galaxy:2073
}
if ((UnitGetCooldown(lp_aIUnit, "SpawnPhaseCannon") <= 0.0)) {
libNtve_gf_AICast(lp_aIUnit, OrderTargetingPoint(AbilityCommand("MutatorAmonPhaseCannon", 0), PointInterpolate(UnitGetPosition(lp_aIUnit), UnitGetPosition(UnitGroupRandomUnit(lp_nearByUnits, c_unitCountAlive)), 0.5)));
return ;
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMU.galaxy:2398
}
if ((libCOMI_gf_MinimumDifficultyValueCoopInteger(0, 0, 1, 1, 0, 0) == 1) && (UnitGetCooldown(lp_aIUnit, "Apocalypse") <= 0.0)) {
lv_abilityRadius = CatalogFieldValueGetAsInt(c_gameCatalogEffect, "Apocalypse", "AreaArray[" + IntToString(0) + "].Radius", lp_owner);
lv_abilityRange = CatalogFieldValueGetAsInt(c_gameCatalogAbil, "MutatorAmonKerriganApocalypse", "Range[" + IntToString(0) + "]", lp_owner);
mods/warcoop/progression/equipments.sc2mod — base.sc2data/LibPEqu.galaxy:53
}
if (!((UnitGetCooldown(lv_attacker, "Artifact/ArtifactHeroAttackTeleport") <= 0.0))) {
return false;
}