# Unit Is Unavailable For Wave Use

Grammarunit is unavailable for wave use
FlagsNative | Function

Returns true if the unit is unusable by waves.

# Arguments

  • unit — Unit

Returns — bool

native bool AIIsNotUsableInWaves(unit u);

Category: AI / MiscCampaign / Functions

# Examples

campaigns/void.sc2campaignbase.sc2maps/maps/campaign/void/sc2epilogue01.sc2map/MapScript.galaxy:6289

        autoAA8579C6_var = UnitGroupUnitFromEnd(autoAA8579C6_g, autoAA8579C6_u);
        if (autoAA8579C6_var == null) { break; }
        if ((UnitGetType(autoAA8579C6_var) != "ShadowCloudEpilogue01") && (AIIsNotUsableInWaves(autoAA8579C6_var) == false) && (AIUnitGetWave(autoAA8579C6_var) == null)) {
            UnitGroupAdd(lv_attackGroup, autoAA8579C6_var);
        }

campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/sc2epilogue01.sc2mapMapScript.galaxy:6289

        autoAA8579C6_var = UnitGroupUnitFromEnd(autoAA8579C6_g, autoAA8579C6_u);
        if (autoAA8579C6_var == null) { break; }
        if ((UnitGetType(autoAA8579C6_var) != "ShadowCloudEpilogue01") && (AIIsNotUsableInWaves(autoAA8579C6_var) == false) && (AIUnitGetWave(autoAA8579C6_var) == null)) {
            UnitGroupAdd(lv_attackGroup, autoAA8579C6_var);
        }