# AISetCooldown

FlagsNative

# Arguments

  • unit — u
  • int — timerIdx
  • fixed — cooldown

Returns — int

native int AISetCooldown(
	unit u,
	int timerIdx,
	fixed cooldown,
);

Category: Unclassified

# Examples

campaigns/liberty.sc2campaignbase.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.sc2campaignbase.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.sc2modbase.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.sc2modbase.sc2data/TriggerLibs/Tactical/TactTerrAI.galaxy:1428

        }
        AICastCooldown(aiUnit, ord, mark, c_castRetreat, c_hsMissileCooldown, cooldown);
        AISetCooldown(aiUnit, c_autoTurretCooldown, sharedCoolDown);
        return;
    }

mods/core.sc2modbase.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.sc2modbase.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.sc2modbase.sc2data/TriggerLibs/Tactical/TactProtAI.galaxy:856

            if (AIEvalTacticalData(aiUnit, null)) {        
                if (AIPlayerDifficulty(player) < c_campExpert) {
                    AISetCooldown(aiUnit, c_psiStormCooldown, 5.0);
                }
                return;