# Get Wants To Move Status

Grammar — Returns true if the AI logic wants to move unit unit
FlagsNative | Function

Returns true if the AI logic wants to move the specified unit.

# Arguments

  • unit — Unit

Returns — bool

native bool AIControlWantsToMove(unit u);

Category: AI Advanced / Tactical / Functions

# Examples

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

                auto2CB28472_var = UnitGroupUnitFromEnd(auto2CB28472_g, auto2CB28472_u);
                if (auto2CB28472_var == null) { break; }
                if ((UnitGetType(auto2CB28472_var) == "SwarmHostSplitBBurrowed") && (AIControlWantsToMove(auto2CB28472_var) == true)) {
                    if (true) {
                        libNtve_gf_AICast(auto2CB28472_var, Order(AbilityCommand("MorphToSwarmHostSplitB", 0)));

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

                auto2CB28472_var = UnitGroupUnitFromEnd(auto2CB28472_g, auto2CB28472_u);
                if (auto2CB28472_var == null) { break; }
                if ((UnitGetType(auto2CB28472_var) == "SwarmHostSplitBBurrowed") && (AIControlWantsToMove(auto2CB28472_var) == true)) {
                    if (true) {
                        libNtve_gf_AICast(auto2CB28472_var, Order(AbilityCommand("MorphToSwarmHostSplitB", 0)));

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

            }
            //  The unit wants to move.
            else if (AIControlWantsToMove(unitToCheck)) {
                wantsToBeInBunker = false;
            }

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

        return;
    }
    if (AIControlWantsToMove(aiUnit)) {
        if (UnitGroupCount(scanGroup, c_unitCountAlive) == 0) {
            return;

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

    }
    // unburrow if we want to move and aren't in combat
    if (AIControlWantsToMove(aiUnit)) {
        if (UnitGroupCount(scanGroup, c_unitCountAlive) == 0) {
            AICast(aiUnit, ord, c_noMarker, c_castHold);

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


    // If we don't have any targets and code wants to move us, transform to move
    if (AIControlWantsToMove(aiUnit)) {
        AICast(aiUnit, ord, c_noMarker, c_castHold);
        return;

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

            return;
        }
        if (AIControlWantsToMove(aiUnit)) {
            // stay mobile if the code wants to move us
            return;

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

            }
            //  The unit wants to move.
            else if (AIControlWantsToMove(unitToCheck)) {
                wantsToBeInBunker = false;
            }

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

    //    return;
    //}
    if (AIControlWantsToMove(aiUnit)) {
        if (UnitGroupCount(scanGroup, c_unitCountAlive) == 0) {
            return;

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

    }
    // unburrow if we want to move and aren't in combat
    if (AIControlWantsToMove(aiUnit)) {
        if (UnitGroupCount(scanGroup, c_unitCountAlive) == 0) {
            AICast(aiUnit, ord, c_noMarker, c_castHold);

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


    // If we don't have any targets and code wants to move us, transform to move
    if (AIControlWantsToMove(aiUnit)) {
        AICast(aiUnit, ord, c_noMarker, c_castHold);
        return;

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

            return;
        }
        if (AIControlWantsToMove(aiUnit)) {
            // stay mobile if the code wants to move us
            return;

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

    }
    else {
        if( AIControlForceToMove(aiUnit) || AIControlWantsToMove(aiUnit)) {
            ord = AICreateOrder(player, c_AB_BurrowSwarmHostUp, 0);
        }