# Add Cooldown For Unit (Deprecated)

Grammar — Add inVal seconds to cooldown inCooldown on unit inUnit
FlagsNative | Action | Hidden

Adds time to the specified unit cooldown link.

# Arguments

  • unit — Unit
  • string<cooldown> — Cooldown
  • fixed — Value

Returns — void

native void UnitAddCooldown(
	unit inUnit,
	string inCooldown,
	fixed inVal,
);

Category: Unit / Charges And Cooldowns / Deprecated

# Examples

mods/heroesdata.stormmodbase.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.stormmodbase.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.stormmodbase.stormdata/TriggerLibs/AILib.galaxy:699

                    }
                    else {
                        UnitAddCooldown(lv_creepUnit, "Abil/UnderworldBossRoots", 0.5);
                    }
                }