# Enable/Disable Wave Use For Unit Group
Grammar — controlled wave use for group|Unit Group
Flags —Native
|Action
If wave use is disabled for a unit group, the AI will not use that unit in waves.
# Arguments
unitgroup
— Groupbool
<preset::EnableDisableOptionReversed> — Enable/Disable
Returns — void
native void AISetGroupNotUsableInWaves(
unitgroup ug,
bool enable,
);
# Related
Category: AI / MiscCampaign / Actions
- Pause AI Time —
void
— AITimePause - Start Campaign AI For All Players —
void
— CampaignInitAI - Start Campaign AI For Player —
void
— AICampaignStart - Global Suicide —
void
— AIGlobalSuicide - Enable/Disable Script Control For Unit —
void
— AISetUnitScriptControlled - Enable/Disable Script Control For Unit Group —
void
— AISetGroupScriptControlled - Enable/Disable Wave Use For Unit —
void
— AISetUnitNotUsableInWaves - Enable/Disable Wave Use For Unit Group —
void
— AISetGroupNotUsableInWaves - Enable/Disable Suicide For Unit —
void
— AISetUnitSuicide - Enable/Disable Suicide For Unit Group —
void
— AISetGroupSuicide - Remove Unit From All Waves —
void
— AIRemoveUnitFromAnyWaves - Remove Unit Group From All Waves —
void
— AIRemoveGroupFromAnyWaves - Remove Unit From All Waves And Set Home —
void
— AIRemoveUnitFromAnyWavesAndSetHome - Remove Unit Group From All Waves And Set Home —
void
— AIRemoveGroupFromAnyWavesAndSetHome - Init Campaign Towns —
void
— AIInitCampaignTowns - Init Campaign Harvesting —
void
— AIInitCampaignHarvest - Issue AI Order —
void
— libNtve_gf_AICast
# Examples
campaigns/swarm.sc2campaign — base.sc2maps/maps/campaign/voidprologue/voidprologue01.sc2map/MapScript.galaxy:3660
UnitGroupClear(gv_currentWaveUnitGroup);
UnitGroupAddUnitGroup(gv_currentWaveUnitGroup, AIWaveGetUnits(gv_currentWave));
AISetGroupNotUsableInWaves(gv_currentWaveUnitGroup, true);
return true;
}
campaigns/swarm.sc2campaign — base.sc2maps/maps/campaign/voidprologue/voidprologue01.sc2map/MapScript.galaxy:3750
UnitGroupClear(gv_currentWaveUnitGroup);
UnitGroupAddUnitGroup(gv_currentWaveUnitGroup, AIWaveGetUnits(gv_currentWave));
AISetGroupNotUsableInWaves(gv_currentWaveUnitGroup, true);
return true;
}
campaigns/swarm.sc2campaign — base.sc2maps/maps/campaign/voidprologue/voidprologue01.sc2map/MapScript.galaxy:4000
UnitGroupClear(gv_currentWaveUnitGroup);
UnitGroupAddUnitGroup(gv_currentWaveUnitGroup, AIWaveGetUnits(gv_currentWave));
AISetGroupNotUsableInWaves(gv_currentWaveUnitGroup, true);
return true;
}
campaigns/swarm.sc2campaign — base.sc2maps/maps/campaign/voidprologue/voidprologue01.sc2map/MapScript.galaxy:4270
UnitGroupClear(gv_currentWaveUnitGroup);
UnitGroupAddUnitGroup(gv_currentWaveUnitGroup, AIWaveGetUnits(gv_currentWave));
AISetGroupNotUsableInWaves(gv_currentWaveUnitGroup, true);
return true;
}
campaigns/swarm.sc2campaign — base.sc2maps/maps/campaign/voidprologue/voidprologue01.sc2map/MapScript.galaxy:4365
UnitGroupClear(gv_currentWaveUnitGroup);
UnitGroupAddUnitGroup(gv_currentWaveUnitGroup, AIWaveGetUnits(gv_currentWave));
AISetGroupNotUsableInWaves(gv_currentWaveUnitGroup, true);
return true;
}
campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/voidprologue/voidprologue01.sc2map — MapScript.galaxy:3660
UnitGroupClear(gv_currentWaveUnitGroup);
UnitGroupAddUnitGroup(gv_currentWaveUnitGroup, AIWaveGetUnits(gv_currentWave));
AISetGroupNotUsableInWaves(gv_currentWaveUnitGroup, true);
return true;
}
campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/voidprologue/voidprologue01.sc2map — MapScript.galaxy:3750
UnitGroupClear(gv_currentWaveUnitGroup);
UnitGroupAddUnitGroup(gv_currentWaveUnitGroup, AIWaveGetUnits(gv_currentWave));
AISetGroupNotUsableInWaves(gv_currentWaveUnitGroup, true);
return true;
}
campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/voidprologue/voidprologue01.sc2map — MapScript.galaxy:4000
UnitGroupClear(gv_currentWaveUnitGroup);
UnitGroupAddUnitGroup(gv_currentWaveUnitGroup, AIWaveGetUnits(gv_currentWave));
AISetGroupNotUsableInWaves(gv_currentWaveUnitGroup, true);
return true;
}
campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/voidprologue/voidprologue01.sc2map — MapScript.galaxy:4270
UnitGroupClear(gv_currentWaveUnitGroup);
UnitGroupAddUnitGroup(gv_currentWaveUnitGroup, AIWaveGetUnits(gv_currentWave));
AISetGroupNotUsableInWaves(gv_currentWaveUnitGroup, true);
return true;
}
campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/voidprologue/voidprologue01.sc2map — MapScript.galaxy:4365
UnitGroupClear(gv_currentWaveUnitGroup);
UnitGroupAddUnitGroup(gv_currentWaveUnitGroup, AIWaveGetUnits(gv_currentWave));
AISetGroupNotUsableInWaves(gv_currentWaveUnitGroup, true);
return true;
}