# Add Cooldown For Unit (Deprecated)
Grammar — Add inVal seconds to cooldown inCooldown on unit inUnit
Flags —Native
|Action
|Hidden
Adds time to the specified unit cooldown link.
# Arguments
unit
— Unitstring
<cooldown> — Cooldownfixed
— Value
Returns — void
native void UnitAddCooldown(
unit inUnit,
string inCooldown,
fixed inVal,
);
# Related
Category: Unit / Charges And Cooldowns / Deprecated
- Remove Charge Regen Time For Unit Behavior (Deprecated) —
void
— libNtve_gf_UnitBehaviorRemoveChargeRegen - Remove Charge Regen Time For Unit Ability (Deprecated) —
void
— libNtve_gf_UnitAbilityRemoveChargeRegen - Remove Charge Regen Time For Unit (Deprecated) —
void
— libNtve_gf_UnitRemoveChargeRegen - Add Charge Regen Time For Unit Behavior (Deprecated) —
void
— UnitBehaviorAddChargeRegen - Add Charge Regen Time For Unit Ability (Deprecated) —
void
— UnitAbilityAddChargeRegen - Add Charge Regen Time For Unit (Deprecated) —
void
— UnitAddChargeRegen - Activate Ability Cooldowns (Deprecated) —
void
— UnitAbilitySpend - Add Cooldown For Unit (Deprecated) —
void
— UnitAddCooldown
# Examples
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/AILib.galaxy:668
if ((UnitGroupCount(lv_enemyGroup, c_unitCountAlive) >= 1)) {
UnitIssueOrder(lv_creepUnit, Order(AbilityCommand("UnderworldBossStun", 0)), c_orderQueueReplace);
UnitAddCooldown(lv_creepUnit, "Abil/UnderworldBossStun", 1.5);
libAIAI_gv_defenderAICreepNeedsNewOrder = false;
}
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/AILib.galaxy:675
if ((UnitGroupCount(lv_enemyGroup, c_unitCountAlive) >= 3)) {
UnitIssueOrder(lv_creepUnit, Order(AbilityCommand("UnderworldBossStun", 0)), c_orderQueueReplace);
UnitAddCooldown(lv_creepUnit, "Abil/UnderworldBossStun", 1.5);
libAIAI_gv_defenderAICreepNeedsNewOrder = false;
}
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/AILib.galaxy:699
}
else {
UnitAddCooldown(lv_creepUnit, "Abil/UnderworldBossRoots", 0.5);
}
}