# Get Wants To Move Status
Grammar — Returns true if the AI logic wants to move unit unit
Flags —Native
|Function
Returns true if the AI logic wants to move the specified unit.
# Arguments
unit
— Unit
Returns — bool
native bool AIControlWantsToMove(unit u);
# Related
Category: AI Advanced / Tactical / Functions
- Same Command —
bool
— AISameCommand - Last Attacker —
unit
— AILastAttacker - Last Attack —
int
— AILastAttack - Get Wants To Move Status —
bool
— AIControlWantsToMove - Is Ignored By Wave —
bool
— AIIsIgnoredByWave - Is In Combat —
bool
— AIUnitIsInCombat - Get Cloaked Attacker —
point
— AIGetCloakedAttacker - Get Best Target Point On Group —
point
— AIBestTargetPoint - Find Units —
unitgroup
— AIFindUnits - Get Default Combat Priority —
unit
— AIDefaultCombatPriority - Combat Diff Flag Special High Priority —
bool
— AICombatDiffFlagCatSpecialHighPrio - Combat Diff Flag Splash High Priority —
bool
— AICombatDiffFlagCatSplashHighPrio - Combat Diff Flag Timed Low Priority —
bool
— AICombatDiffFlagCatTimedLowPrio - Combat Diff Flag Workers Normal Priority —
bool
— AICombatDiffFlagCatWorkersNormalPrio - Combat Diff Flag Sort Buildings Priority —
bool
— AICombatDiffFlagCatSortBuildingsPrio - Combat Diff Flag Healers —
bool
— AICombatDiffFlagTieBreakHealers - Combat Diff Flag Low Health —
bool
— AICombatDiffFlagTieBreakLowHP - Combat Diff Flag Bonus Damage —
bool
— AICombatDiffFlagTieBreakBonusDamage - Combat Diff Flag Injured —
bool
— AICombatDiffFlagTieBreakInjured - Combat Diff Flag Detector —
bool
— AICombatDiffFlagTieBreakDetector - Combat Diff Flag Siege Range —
bool
— AICombatDiffFlagTieBreakRange - Does Unit Have Tactical Disabled —
bool
— AIIsTacticalDisabled
# Examples
campaigns/void.sc2campaign — base.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.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)));
mods/core.sc2mod — base.sc2data/TriggerLibs/Tactical/TactTerrAI.galaxy:815
}
// The unit wants to move.
else if (AIControlWantsToMove(unitToCheck)) {
wantsToBeInBunker = false;
}
mods/core.sc2mod — base.sc2data/TriggerLibs/Tactical/TactTerrAI.galaxy:1508
return;
}
if (AIControlWantsToMove(aiUnit)) {
if (UnitGroupCount(scanGroup, c_unitCountAlive) == 0) {
return;
mods/core.sc2mod — base.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.sc2mod — base.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.sc2mod — base.sc2data/TriggerLibs/Tactical/TactTerrAI.galaxy:1778
return;
}
if (AIControlWantsToMove(aiUnit)) {
// stay mobile if the code wants to move us
return;
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/Tactical/TactTerrAI.galaxy:791
}
// The unit wants to move.
else if (AIControlWantsToMove(unitToCheck)) {
wantsToBeInBunker = false;
}
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/Tactical/TactTerrAI.galaxy:1431
// return;
//}
if (AIControlWantsToMove(aiUnit)) {
if (UnitGroupCount(scanGroup, c_unitCountAlive) == 0) {
return;
mods/starcoop/starcoop.sc2mod — base.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.sc2mod — base.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.sc2mod — base.sc2data/TriggerLibs/Tactical/TactTerrAI.galaxy:1732
return;
}
if (AIControlWantsToMove(aiUnit)) {
// stay mobile if the code wants to move us
return;
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/Tactical/TactZergAI.galaxy:1580
}
else {
if( AIControlForceToMove(aiUnit) || AIControlWantsToMove(aiUnit)) {
ord = AICreateOrder(player, c_AB_BurrowSwarmHostUp, 0);
}