# AITactCooldownAllow

FlagsNative

# Arguments

  • unit — u
  • int — timerIdx

Returns — bool

native bool AITactCooldownAllow(unit u, int timerIdx);

Category: Unclassified

# Examples

campaigns/liberty.sc2campaignbase.sc2data/TriggerLibs/Tactical/TactCampAI.galaxy:163

    }

    if (!AITactCooldownAllow(aiUnit, c_mineCooldown)) {
        return;
    }

campaigns/liberty.sc2campaignbase.sc2data/TriggerLibs/Tactical/TactCampAI.galaxy:260


    if (AIPlayerDifficulty(player) >= c_campAdvanced) {
        if (AITactCooldownAllow(aiUnit, c_lokiMissilesCooldown)) {
            // Loki Missile Pods located in TacticalData.xml / TargetFindData.xml
            if (AIEvalTacticalData(aiUnit, null)) {

campaigns/liberty.sc2campaignbase.sc2data/TriggerLibs/Tactical/TactCampAI.galaxy:270



    if (!AITactCooldownAllow(aiUnit, c_lokiYamatoCooldown)) {
        return;
    }

campaigns/swarm.sc2campaignbase.sc2data/TriggerLibs/Tactical/TactCampAI.galaxy:163

    }

    if (!AITactCooldownAllow(aiUnit, c_mineCooldown)) {
        return;
    }

campaigns/swarm.sc2campaignbase.sc2data/TriggerLibs/Tactical/TactCampAI.galaxy:260


    if (AIPlayerDifficulty(player) >= c_campAdvanced) {
        if (AITactCooldownAllow(aiUnit, c_lokiMissilesCooldown)) {
            // Loki Missile Pods located in TacticalData.xml / TargetFindData.xml
            if (AIEvalTacticalData(aiUnit, null)) {

campaigns/swarm.sc2campaignbase.sc2data/TriggerLibs/Tactical/TactCampAI.galaxy:270



    if (!AITactCooldownAllow(aiUnit, c_lokiYamatoCooldown)) {
        return;
    }

campaigns/void.sc2campaignbase.sc2data/TriggerLibs/Tactical/TactCampAI.galaxy:163

    }

    if (!AITactCooldownAllow(aiUnit, c_mineCooldown)) {
        return;
    }

campaigns/void.sc2campaignbase.sc2data/TriggerLibs/Tactical/TactCampAI.galaxy:832

    unitgroup enemyGroup;

    if (!AITactCooldownAllow(aiUnit, c_EnsnareCooldown)) {
        return null;
    }

mods/core.sc2modbase.sc2data/TriggerLibs/Tactical/TactProtAI.galaxy:551

    }

    if (!AITactCooldownAllow(aiUnit, c_timeWarpCooldown)) {        
        return null;
    }

mods/core.sc2modbase.sc2data/TriggerLibs/Tactical/TactProtAI.galaxy:875


    if (!AIIsCampaign(player) || AIPlayerDifficulty(player) >= c_campAdvanced) {
        if (AITactCooldownAllow(aiUnit, c_psiStormCooldown)) {
            // psi storm
            if (AIEvalTacticalData(aiUnit, null)) {        

mods/core.sc2modbase.sc2data/TriggerLibs/Tactical/TactProtAI.galaxy:1297

    }

    if (!AITactCooldownAllow(aiUnit, c_oracleRevelationCooldown)) {
        return null;
    }

mods/core.sc2modbase.sc2data/TriggerLibs/Tactical/TactTerrAI.galaxy:197

    unitgroup nonpsiGroup;

    if (!AITactCooldownAllow(aiUnit, c_snipeCooldown)) {
        return null;
    }

mods/core.sc2modbase.sc2data/TriggerLibs/Tactical/TactTerrAI.galaxy:252

    unitgroup targetGroup;

    if (!AITactCooldownAllow(aiUnit, c_snipeCooldown)) {
        return null;
    }

mods/core.sc2modbase.sc2data/TriggerLibs/Tactical/TactTerrAI.galaxy:425

    unitgroup targetGroup;

    if (!AITactCooldownAllow(aiUnit, c_yamatoCooldown)) {
        return null;
    }

mods/core.sc2modbase.sc2data/TriggerLibs/Tactical/TactTerrAI.galaxy:1220

    }

    if (!AITactCooldownAllow(aiUnit, c_hsMissileCooldown)) {
        return null;
    }

mods/core.sc2modbase.sc2data/TriggerLibs/Tactical/TactTerrAI.galaxy:1319

    fixed cooldown = 0.0;

    if (!AITactCooldownAllow(aiUnit, c_autoTurretCooldown)) {
        return false;
    }

mods/core.sc2modbase.sc2data/TriggerLibs/Tactical/TactTerrAI.galaxy:1337

        // If Raven not low vitality, save enough energy for seeker missile.
        // Unless we've cast a missile recently, or we're a low difficulty campaign mission.
        if (AITactCooldownAllow(aiUnit, c_hsMissileCooldown)) {
            if (!AIIsCampaign(player) || AIPlayerDifficulty(player) >= c_campExpert) {
                missleOrd = AITacticalOrder(player, aiUnit, c_AB_SeekerMissile);

mods/core.sc2modbase.sc2data/TriggerLibs/Tactical/TactZergAI.galaxy:522

    point loc;
    
    if (!AITactCooldownAllow(aiUnit, c_fungalGrowthCooldown)) {
        return null;
    }

mods/core.sc2modbase.sc2data/TriggerLibs/Tactical/TactZergAI.galaxy:572

    unitgroup targetGroup;
    
    if (!AITactCooldownAllow(aiUnit, c_infestedTerransCooldown)) {
        return null;
    }

mods/starcoop/starcoop.sc2modbase.sc2data/TriggerLibs/Tactical/TactCampAI.galaxy:65

	point loc;
	
    if (!AITactCooldownAllow(aiUnit, c_DarkSwarmCooldown)) {
        return null;
    }

mods/starcoop/starcoop.sc2modbase.sc2data/TriggerLibs/Tactical/TactCampAI.galaxy:208

    unitgroup enemyGroup;

    if (!AITactCooldownAllow(aiUnit, c_EnsnareCooldown)) {
        return null;
    }

mods/starcoop/starcoop.sc2modbase.sc2data/TriggerLibs/Tactical/TactCampAI.galaxy:259

    int scanCount;

    if (!AITactCooldownAllow(aiUnit, c_SpawnBroodlingsCooldown)) {
        return null;
    }

mods/starcoop/starcoop.sc2modbase.sc2data/TriggerLibs/Tactical/TactCampAI.galaxy:513

    }

    if (!AITactCooldownAllow(aiUnit, c_mineCooldown)) {
        return;
    }

mods/starcoop/starcoop.sc2modbase.sc2data/TriggerLibs/Tactical/TactCampAI.galaxy:616


    if (AIPlayerDifficulty(player) >= c_campAdvanced) {
        if (AITactCooldownAllow(aiUnit, c_lokiMissilesCooldown)) {
            // Loki Missile Pods located in TacticalData.xml / TargetFindData.xml
            if (AIEvalTacticalData(aiUnit, null)) {

mods/starcoop/starcoop.sc2modbase.sc2data/TriggerLibs/Tactical/TactCampAI.galaxy:626



    if (!AITactCooldownAllow(aiUnit, c_lokiYamatoCooldown)) {
        return;
    }

mods/starcoop/starcoop.sc2modbase.sc2data/TriggerLibs/Tactical/TactCampAI.galaxy:1327

	}
	
	if (!AITactCooldownAllow(aiUnit, c_HybridGravitonPrison)) {
		return;
	}

mods/starcoop/starcoop.sc2modbase.sc2data/TriggerLibs/Tactical/TactCampAI.galaxy:1422

	int diff = AIPlayerDifficulty(player);
	
	if (!AITactCooldownAllow(aiUnit, c_HybridPhaseShift)) {
		return;
	}

mods/starcoop/starcoop.sc2modbase.sc2data/TriggerLibs/Tactical/TactCampAI.galaxy:1639

    }
	
    if (!AITactCooldownAllow(aiUnit, c_scienceVesselDMatrixCooldown)) {
        return null;
    }

mods/starcoop/starcoop.sc2modbase.sc2data/TriggerLibs/Tactical/TactCampAI.galaxy:1674

	int count;
	
    if (!AITactCooldownAllow(aiUnit, c_scienceVesselIrradiateCooldown)) {
        return null;
    }    

mods/starcoop/starcoop.sc2modbase.sc2data/TriggerLibs/Tactical/TactProtAI.galaxy:852


    if (AIPlayerDifficulty(player) >= c_campAdvanced) {
        if (AITactCooldownAllow(aiUnit, c_psiStormCooldown)) {
            // psi storm
            if (AIEvalTacticalData(aiUnit, null)) {        

mods/starcoop/starcoop.sc2modbase.sc2data/TriggerLibs/Tactical/TactTerrAI.galaxy:199

    unitgroup targetGroup;

    if (!AITactCooldownAllow(aiUnit, c_snipeCooldown)) {
        return null;
    }

mods/starcoop/starcoop.sc2modbase.sc2data/TriggerLibs/Tactical/TactTerrAI.galaxy:244

    unitgroup targetGroup;

    if (!AITactCooldownAllow(aiUnit, c_snipeCooldown)) {
        return null;
    }

mods/starcoop/starcoop.sc2modbase.sc2data/TriggerLibs/Tactical/TactTerrAI.galaxy:407

    unitgroup targetGroup;

    if (!AITactCooldownAllow(aiUnit, c_yamatoCooldown)) {
        return null;
    }

mods/starcoop/starcoop.sc2modbase.sc2data/TriggerLibs/Tactical/TactTerrAI.galaxy:1192

    }

    if (!AITactCooldownAllow(aiUnit, c_hsMissileCooldown)) {
        return null;
    }

mods/starcoop/starcoop.sc2modbase.sc2data/TriggerLibs/Tactical/TactTerrAI.galaxy:1291

    fixed cooldown = 0.0;

    if (!AITactCooldownAllow(aiUnit, c_autoTurretCooldown)) {
        return false;
    }

mods/starcoop/starcoop.sc2modbase.sc2data/TriggerLibs/Tactical/TactTerrAI.galaxy:1309

        // If Raven not low vitality, save enough energy for seeker missile.
        // Unless we've cast a missile recently, or we're a low difficulty campaign mission.
        if (AITactCooldownAllow(aiUnit, c_hsMissileCooldown)) {
            if (AIPlayerDifficulty(player) >= c_campExpert) {
                missleOrd = AITacticalOrder(player, aiUnit, c_AB_SeekerMissile);

mods/starcoop/starcoop.sc2modbase.sc2data/TriggerLibs/Tactical/TactZergAI.galaxy:507

    //Parasitic Bomb
    if(AIPlayerDifficulty(player) > c_campNormal) {
        if (AITactCooldownAllow(aiUnit, c_ParasiticBombCoolDown)) {
            mark = AIMarker(aiUnit, c_MK_ViperParasiticBomb);
            ord = ParasiticBomb(player, aiUnit, scanGroup, mark);

mods/starcoop/starcoop.sc2modbase.sc2data/TriggerLibs/Tactical/TactZergAI.galaxy:526

    //Disabling Cloud
    if(AIPlayerDifficulty(player) > c_campAdvanced) {       
        if (AITactCooldownAllow(aiUnit, c_DisablingCloudCoolDown)) {
            ord = DisablingCloud(player, aiUnit, scanGroup);
            if (ord != null) {

mods/starcoop/starcoop.sc2modbase.sc2data/TriggerLibs/Tactical/TactZergAI.galaxy:544

    //Abduct    
    if(AIPlayerDifficulty(player) > c_campNormal) {
        if (AITactCooldownAllow(aiUnit, c_AbductCoolDown)) {
            mark = AIMarker(aiUnit, c_MK_ViperAbduct);
            ord = Abduct(player, aiUnit, scanGroup, mark);

mods/starcoop/starcoop.sc2modbase.sc2data/TriggerLibs/Tactical/TactZergAI.galaxy:563

    //Consumption
    if(AIPlayerDifficulty(player) > c_campNormal) {
        if (AITactCooldownAllow(aiUnit, c_ViperConsumptionCoolDown)) {
            ord = ViperConsumption(player, aiUnit, scanGroup);
            if (ord != null) {

mods/starcoop/starcoop.sc2modbase.sc2data/TriggerLibs/Tactical/TactZergAI.galaxy:733

    point loc;
    
    if (!AITactCooldownAllow(aiUnit, c_fungalGrowthCooldown)) {
        return null;
    }

mods/starcoop/starcoop.sc2modbase.sc2data/TriggerLibs/Tactical/TactZergAI.galaxy:783

    unitgroup targetGroup;
    
    if (!AITactCooldownAllow(aiUnit, c_infestedTerransCooldown)) {
        return null;
    }