# Enable/Disable Wave Use For Unit Group

Grammarcontrolled wave use for group|Unit Group
FlagsNative | Action

If wave use is disabled for a unit group, the AI will not use that unit in waves.

# Arguments

Returns — void

native void AISetGroupNotUsableInWaves(
	unitgroup ug,
	bool enable,
);

Category: AI / MiscCampaign / Actions

# Examples

campaigns/swarm.sc2campaignbase.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.sc2campaignbase.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.sc2campaignbase.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.sc2campaignbase.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.sc2campaignbase.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.sc2mapMapScript.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.sc2mapMapScript.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.sc2mapMapScript.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.sc2mapMapScript.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.sc2mapMapScript.galaxy:4365

    UnitGroupClear(gv_currentWaveUnitGroup);
    UnitGroupAddUnitGroup(gv_currentWaveUnitGroup, AIWaveGetUnits(gv_currentWave));
    AISetGroupNotUsableInWaves(gv_currentWaveUnitGroup, true);
    return true;
}