# Activate Ability Cooldowns
Grammar — Activate spendLocation|Location cooldowns on ability abilityCommand|Ability on unit u
Flags —Native
|Action
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 Locationfixed
— Vitals Factorfixed
— Resources Factorfixed
— Charges Factorfixed
— Cooldown Factor
Returns — void
native void UnitAbilitySpendExplicit(
unit inUnit,
abilcmd inAbilCmd,
int inLocation,
fixed inVitalsFactor,
fixed inResourcesFactor,
fixed inChargesFactor,
fixed inCooldownFactor,
);
# 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/GameDataHelperLib.galaxy:20926
UnitAbilityReset(lv_sgtHammerUnit, AbilityCommand("SgtHammerSiegeMode", 0), c_spendLocationAll);
UnitAbilitySpendExplicit(lv_sgtHammerUnit, AbilityCommand("SgtHammerSiegeMode", 0), c_spendLocationAll, 0.0, 1.0, 1.0, 1.0);
return true;
}
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameLib.galaxy:18039
}
if ((lv_dummyEffect != null)) {
UnitAbilitySpendExplicit(lv_heroUnit, lv_cmd, c_spendLocationAll, 1.0, 1.0, 1.0, 1.0);
UnitCreateEffectPoint(lv_heroUnit, lv_dummyEffect, lv_point);
}
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/MapMechanicsLib.galaxy:7438
}
UnitAbilitySpendExplicit(libMapM_gv_mMGardensDragonStatue, AbilityCommand("LeaveVehicle", 0), c_spendLocationAbility, 1.0, 1.0, 1.0, 1.0);
return true;
}
mods/missionpacks/novacampaign.sc2mod — base.sc2data/LibNCMI.galaxy:1938
if ((lv_trainingNukeFound == true)) {
libNtve_gf_UnitAbilityRemoveCooldown(libNCMI_gv_nM_NovaHeroUnit, "NovaNukeTimer", "Abil/NovaNukeTimer");
UnitAbilitySpendExplicit(libNCMI_gv_nM_NovaHeroUnit, AbilityCommand("NovaNukeTimer", 0), c_spendLocationAbility, 1.0, 1.0, 1.0, 1.0);
UnitAbilityAddCooldown(libNCMI_gv_nM_NovaHeroUnit, "NovaNukeTimer", "Abil/NovaNukeTimer", (lv_lowestResearchTime - 300.0));
UnitBehaviorAdd(libNCMI_gv_nM_NovaHeroUnit, "NovaNukeTimer", libNCMI_gv_nM_NovaHeroUnit, 1);
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:28838
}
UnitAbilitySpendExplicit(lv_caster, lv_cmd, c_spendLocationAll, 1.0, 1.0, 1.0, 1.0);
return true;
}
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:28875
}
UnitAbilitySpendExplicit(lv_caster, lv_cmd, c_spendLocationAll, 1.0, 1.0, 1.0, 1.0);
return true;
}
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:28912
}
UnitAbilitySpendExplicit(lv_caster, lv_cmd, c_spendLocationAll, 1.0, 1.0, 1.0, 1.0);
return true;
}