# Wait Until Unit Becomes Idle
Grammar — Wait until u idle|Becomes/Stops Being idle
Flags —Native
|Action
Waits until a unit either becomes idle or discontinues being idle, depending on the Idle parameter.
# Arguments
unit
— Unitbool
<preset::IdleState> — Idle
Returns — void
native void UnitWaitUntilIdle(unit inUnit, bool inIdle);
# Related
Category: Unit / Orders
- Triggering Order —
order
— EventUnitOrder - Issue Order —
bool
— UnitIssueOrder - Issue Order To Unit Group —
bool
— UnitGroupIssueOrder - Unit Order Count —
int
— UnitOrderCount - Unit Order —
order
— UnitOrder - Unit Order Is Acquired —
bool
— UnitOrderIsAcquired - Unit Has Order With Ability —
bool
— UnitOrderHasAbil - Unit Is Issued Order —
void
— TriggerAddEventUnitOrder - Unit Becomes Idle —
void
— TriggerAddEventUnitBecomesIdle - Wait Until Unit Becomes Idle —
void
— UnitWaitUntilIdle - Wait Until Unit Group Becomes Idle —
void
— UnitGroupWaitUntilIdle - Unit Rally Point —
int
— UnitRallyPoint - Unit Rally Point Count —
int
— UnitRallyPointCount - Unit Rally Point Target Count —
int
— UnitRallyPointTargetCount - Unit Rally Point Target Point —
point
— UnitRallyPointTargetPoint - Unit Rally Point Target Unit —
unit
— UnitRallyPointTargetUnit - Unit Order Get Progress —
fixed
— UnitOrderGetProgress
# Examples
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:27194
UnitIssueOrder(lv_voidseeker, OrderTargetingPoint(AbilityCommand("move", 0), lv_nextinterpolatedpoint), c_orderQueueAddToEnd);
Wait(0.25, c_timeGame);
UnitWaitUntilIdle(lv_voidseeker, true);
lv_cargounits = UnitCargoGroup(lv_voidseeker);
autoF8BB9D10_g = lv_cargounits;