# Wait Until Unit Becomes Idle

Grammar — Wait until u idle|Becomes/Stops Being idle
FlagsNative | Action

Waits until a unit either becomes idle or discontinues being idle, depending on the Idle parameter.

# Arguments

  • unit — Unit
  • bool<preset::IdleState> — Idle

Returns — void

native void UnitWaitUntilIdle(unit inUnit, bool inIdle);

Category: Unit / Orders

# Examples

mods/starcoop/starcoop.sc2modbase.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;