# Unit Becomes Idle

Grammaru idleState|Becomes/Stops Being idle
FlagsNative | Event

This event fires when a unit becomes or stops idling.

# Arguments

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

Returns — void

native void TriggerAddEventUnitBecomesIdle(
	trigger t,
	unitref u,
	bool idle,
);

Category: Unit / Orders

# Examples

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thorner04.sc2map/MapScript.galaxy:2349

void gt_SCVGoesIdle_Init () {
    gt_SCVGoesIdle = TriggerCreate("gt_SCVGoesIdle_Func");
    TriggerAddEventUnitBecomesIdle(gt_SCVGoesIdle, null, true);
}

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/ttosh01.sc2map/MapScript.galaxy:2246

void gt_IntroReapersChangeOwner_Init () {
    gt_IntroReapersChangeOwner = TriggerCreate("gt_IntroReapersChangeOwner_Func");
    TriggerAddEventUnitBecomesIdle(gt_IntroReapersChangeOwner, null, true);
}

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/ttosh02.sc2map/MapScript.galaxy:2705

void gt_Protossprobegoesidleterrazineharvestedbyplayer_Init () {
    gt_Protossprobegoesidleterrazineharvestedbyplayer = TriggerCreate("gt_Protossprobegoesidleterrazineharvestedbyplayer_Func");
    TriggerAddEventUnitBecomesIdle(gt_Protossprobegoesidleterrazineharvestedbyplayer, null, true);
}

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tzeratul03.sc2map/MapScript.galaxy:1673

    gt_OverlordWandering = TriggerCreate("gt_OverlordWandering_Func");
    TriggerEnable(gt_OverlordWandering, false);
    TriggerAddEventUnitBecomesIdle(gt_OverlordWandering, null, true);
}

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tzeratul03.sc2map/MapScript.galaxy:4605

    gt_BriefingScene00WanderingZerg = TriggerCreate("gt_BriefingScene00WanderingZerg_Func");
    TriggerEnable(gt_BriefingScene00WanderingZerg, false);
    TriggerAddEventUnitBecomesIdle(gt_BriefingScene00WanderingZerg, null, true);
}

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tzeratul03.sc2map/MapScript.galaxy:4666

    gt_BriefingScene01WanderingZerg = TriggerCreate("gt_BriefingScene01WanderingZerg_Func");
    TriggerEnable(gt_BriefingScene01WanderingZerg, false);
    TriggerAddEventUnitBecomesIdle(gt_BriefingScene01WanderingZerg, null, true);
}

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/thorner04.sc2mapMapScript.galaxy:2349

void gt_SCVGoesIdle_Init () {
    gt_SCVGoesIdle = TriggerCreate("gt_SCVGoesIdle_Func");
    TriggerAddEventUnitBecomesIdle(gt_SCVGoesIdle, null, true);
}

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttosh01.sc2mapMapScript.galaxy:2246

void gt_IntroReapersChangeOwner_Init () {
    gt_IntroReapersChangeOwner = TriggerCreate("gt_IntroReapersChangeOwner_Func");
    TriggerAddEventUnitBecomesIdle(gt_IntroReapersChangeOwner, null, true);
}

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttosh02.sc2mapMapScript.galaxy:2705

void gt_Protossprobegoesidleterrazineharvestedbyplayer_Init () {
    gt_Protossprobegoesidleterrazineharvestedbyplayer = TriggerCreate("gt_Protossprobegoesidleterrazineharvestedbyplayer_Func");
    TriggerAddEventUnitBecomesIdle(gt_Protossprobegoesidleterrazineharvestedbyplayer, null, true);
}

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tzeratul03.sc2mapMapScript.galaxy:1673

    gt_OverlordWandering = TriggerCreate("gt_OverlordWandering_Func");
    TriggerEnable(gt_OverlordWandering, false);
    TriggerAddEventUnitBecomesIdle(gt_OverlordWandering, null, true);
}

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tzeratul03.sc2mapMapScript.galaxy:4605

    gt_BriefingScene00WanderingZerg = TriggerCreate("gt_BriefingScene00WanderingZerg_Func");
    TriggerEnable(gt_BriefingScene00WanderingZerg, false);
    TriggerAddEventUnitBecomesIdle(gt_BriefingScene00WanderingZerg, null, true);
}

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tzeratul03.sc2mapMapScript.galaxy:4666

    gt_BriefingScene01WanderingZerg = TriggerCreate("gt_BriefingScene01WanderingZerg_Func");
    TriggerEnable(gt_BriefingScene01WanderingZerg, false);
    TriggerAddEventUnitBecomesIdle(gt_BriefingScene01WanderingZerg, null, true);
}

campaigns/swarm.sc2campaignbase.sc2maps/maps/campaign/swarm/zlab02.sc2map/MapScript.galaxy:2614

    gt_KerriganMovesTurnoffChatter = TriggerCreate("gt_KerriganMovesTurnoffChatter_Func");
    TriggerEnable(gt_KerriganMovesTurnoffChatter, false);
    TriggerAddEventUnitBecomesIdle(gt_KerriganMovesTurnoffChatter, UnitRefFromVariable("gv_kerrigan"), false);
}

campaigns/swarm.sc2campaignbase.sc2maps/maps/campaign/swarm/zzerus03.sc2map/MapScript.galaxy:4613

    gt_YagdraIdle = TriggerCreate("gt_YagdraIdle_Func");
    TriggerEnable(gt_YagdraIdle, false);
    TriggerAddEventUnitBecomesIdle(gt_YagdraIdle, UnitRefFromVariable("gv_yagdra"), true);
}

campaigns/swarm.sc2campaignbase.sc2maps/maps/campaign/swarm/zzerus03.sc2map/MapScript.galaxy:6332

    gt_KraithIdle = TriggerCreate("gt_KraithIdle_Func");
    TriggerEnable(gt_KraithIdle, false);
    TriggerAddEventUnitBecomesIdle(gt_KraithIdle, UnitRefFromVariable("gv_kraith"), true);
}

campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zlab02.sc2mapMapScript.galaxy:2614

    gt_KerriganMovesTurnoffChatter = TriggerCreate("gt_KerriganMovesTurnoffChatter_Func");
    TriggerEnable(gt_KerriganMovesTurnoffChatter, false);
    TriggerAddEventUnitBecomesIdle(gt_KerriganMovesTurnoffChatter, UnitRefFromVariable("gv_kerrigan"), false);
}

campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zzerus03.sc2mapMapScript.galaxy:4613

    gt_YagdraIdle = TriggerCreate("gt_YagdraIdle_Func");
    TriggerEnable(gt_YagdraIdle, false);
    TriggerAddEventUnitBecomesIdle(gt_YagdraIdle, UnitRefFromVariable("gv_yagdra"), true);
}

campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zzerus03.sc2mapMapScript.galaxy:6332

    gt_KraithIdle = TriggerCreate("gt_KraithIdle_Func");
    TriggerEnable(gt_KraithIdle, false);
    TriggerAddEventUnitBecomesIdle(gt_KraithIdle, UnitRefFromVariable("gv_kraith"), true);
}

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

void gt_NarudIdleClearLookAt_Init () {
    gt_NarudIdleClearLookAt = TriggerCreate("gt_NarudIdleClearLookAt_Func");
    TriggerAddEventUnitBecomesIdle(gt_NarudIdleClearLookAt, UnitRefFromVariable("gv_narud"), true);
}

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

void gt_NarudIdleClearLookAt_Init () {
    gt_NarudIdleClearLookAt = TriggerCreate("gt_NarudIdleClearLookAt_Func");
    TriggerAddEventUnitBecomesIdle(gt_NarudIdleClearLookAt, UnitRefFromVariable("gv_narud"), true);
}