# Activate Ability Cooldowns

Grammar — Activate spendLocation|Location cooldowns on ability abilityCommand|Ability on unit u
FlagsNative | 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 — Unit
  • abilcmd — Ability Command
  • int [ preset::Unit_Color_Change_Option24 ] — Spend Location
  • fixed — Vitals Factor
  • fixed — Resources Factor
  • fixed — Charges Factor
  • fixed — Cooldown Factor

Returns — void

native void UnitAbilitySpendExplicit(
	unit inUnit,
	abilcmd inAbilCmd,
	int inLocation,
	fixed inVitalsFactor,
	fixed inResourcesFactor,
	fixed inChargesFactor,
	fixed inCooldownFactor,
);

Category: Unit / Charges And Cooldowns

# Examples

# mods/heroesdata.stormmod

GameDataHelperLib.galaxy

// L20926
UnitAbilitySpendExplicit(lv_sgtHammerUnit, AbilityCommand("SgtHammerSiegeMode", 0), c_spendLocationAll, 0.0, 1.0, 1.0, 1.0)

# mods/heroesdata.stormmod

GameLib.galaxy

// L18039
UnitAbilitySpendExplicit(lv_heroUnit, lv_cmd, c_spendLocationAll, 1.0, 1.0, 1.0, 1.0)

# mods/heroesdata.stormmod

MapMechanicsLib.galaxy

// L7438
UnitAbilitySpendExplicit(libMapM_gv_mMGardensDragonStatue, AbilityCommand("LeaveVehicle", 0), c_spendLocationAbility, 1.0, 1.0, 1.0, 1.0)

# mods/missionpacks/novacampaign.sc2mod

LibNCMI.galaxy

// L1938
UnitAbilitySpendExplicit(libNCMI_gv_nM_NovaHeroUnit, AbilityCommand("NovaNukeTimer", 0), c_spendLocationAbility, 1.0, 1.0, 1.0, 1.0)

# mods/starcoop/starcoop.sc2mod

LibCOMI.galaxy

// L28830
UnitAbilitySpendExplicit(lv_caster, lv_cmd, c_spendLocationAll, 1.0, 1.0, 1.0, 1.0)
// L28867
UnitAbilitySpendExplicit(lv_caster, lv_cmd, c_spendLocationAll, 1.0, 1.0, 1.0, 1.0)
// L28904
UnitAbilitySpendExplicit(lv_caster, lv_cmd, c_spendLocationAll, 1.0, 1.0, 1.0, 1.0)