# Activate Ability Cooldowns (Deprecated)
Grammar — Activate spendLocation|Location cooldowns on ability abilityCommand|Ability on unit u
Flags —Native
|Action
|Hidden
Activates the specified cooldowns on the specified ability on the specified unit. In most cases, this will cause the ability to act as if it had just been used.
# Arguments
unit
— Unitabilcmd
— Ability Commandint
<preset::Unit_Color_Change_Option24> — Spend Location
Returns — void
native void UnitAbilitySpend(
unit inUnit,
abilcmd inAbilCmd,
int inLocation,
);
# 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
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tvalerian03.sc2map/MapScript.galaxy:5355
TriggerExecute(gt_StartAI, true, false);
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);
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tvalerian03.sc2map — MapScript.galaxy:5355
TriggerExecute(gt_StartAI, true, false);
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);