# AISetCooldown
Flags —
Native
# Arguments
unit
— uint
— timerIdxfixed
— cooldown
Returns — int
native int AISetCooldown(
unit u,
int timerIdx,
fixed cooldown,
);
# Related
Category: Unclassified
# Examples
campaigns/liberty.sc2campaign — base.sc2data/TriggerLibs/Tactical/TactCampAI.galaxy:263
// Loki Missile Pods located in TacticalData.xml / TargetFindData.xml
if (AIEvalTacticalData(aiUnit, null)) {
AISetCooldown(aiUnit, c_lokiMissilesCooldown, 5.0);
return;
}
campaigns/swarm.sc2campaign — base.sc2data/TriggerLibs/Tactical/TactCampAI.galaxy:263
// Loki Missile Pods located in TacticalData.xml / TargetFindData.xml
if (AIEvalTacticalData(aiUnit, null)) {
AISetCooldown(aiUnit, c_lokiMissilesCooldown, 5.0);
return;
}
mods/core.sc2mod — base.sc2data/TriggerLibs/Tactical/TactProtAI.galaxy:879
if (AIEvalTacticalData(aiUnit, null)) {
if (AIIsCampaign(player) && AIPlayerDifficulty(player) < c_campExpert) {
AISetCooldown(aiUnit, c_psiStormCooldown, 5.0);
}
return;
mods/core.sc2mod — base.sc2data/TriggerLibs/Tactical/TactTerrAI.galaxy:1428
}
AICastCooldown(aiUnit, ord, mark, c_castRetreat, c_hsMissileCooldown, cooldown);
AISetCooldown(aiUnit, c_autoTurretCooldown, sharedCoolDown);
return;
}
mods/core.sc2mod — base.sc2data/TriggerLibs/Tactical/TactTerrAI.galaxy:1442
lowVitality = UnitGetPropertyInt(aiUnit, c_unitPropVitalityPercent, c_unitPropCurrent) < c_RavenLowVitalityPercent;
if (CastAutoTurret(player, aiUnit, scanGroup, lowVitality)) {
AISetCooldown(aiUnit, c_hsMissileCooldown, sharedCoolDown);
return;
}
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/Tactical/TactCampAI.galaxy:619
// Loki Missile Pods located in TacticalData.xml / TargetFindData.xml
if (AIEvalTacticalData(aiUnit, null)) {
AISetCooldown(aiUnit, c_lokiMissilesCooldown, 5.0);
return;
}
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/Tactical/TactProtAI.galaxy:856
if (AIEvalTacticalData(aiUnit, null)) {
if (AIPlayerDifficulty(player) < c_campExpert) {
AISetCooldown(aiUnit, c_psiStormCooldown, 5.0);
}
return;