# Unit Becomes Idle
Grammar — u idleState|Becomes/Stops Being idle
Flags —Native
|Event
This event fires when a unit becomes or stops idling.
# Arguments
unitref
<unit> — Unitbool
<preset::IdleState> — Idle State
Returns — void
native void TriggerAddEventUnitBecomesIdle(
trigger t,
unitref u,
bool idle,
);
# 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
campaigns/liberty.sc2campaign — base.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.sc2campaign — base.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.sc2campaign — base.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.sc2campaign — base.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.sc2campaign — base.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.sc2campaign — base.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.sc2map — MapScript.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.sc2map — MapScript.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.sc2map — MapScript.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.sc2map — MapScript.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.sc2map — MapScript.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.sc2map — MapScript.galaxy:4666
gt_BriefingScene01WanderingZerg = TriggerCreate("gt_BriefingScene01WanderingZerg_Func");
TriggerEnable(gt_BriefingScene01WanderingZerg, false);
TriggerAddEventUnitBecomesIdle(gt_BriefingScene01WanderingZerg, null, true);
}
campaigns/swarm.sc2campaign — base.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.sc2campaign — base.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.sc2campaign — base.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.sc2map — MapScript.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.sc2map — MapScript.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.sc2map — MapScript.galaxy:6332
gt_KraithIdle = TriggerCreate("gt_KraithIdle_Func");
TriggerEnable(gt_KraithIdle, false);
TriggerAddEventUnitBecomesIdle(gt_KraithIdle, UnitRefFromVariable("gv_kraith"), true);
}
campaigns/void.sc2campaign — base.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.sc2map — MapScript.galaxy:6566
void gt_NarudIdleClearLookAt_Init () {
gt_NarudIdleClearLookAt = TriggerCreate("gt_NarudIdleClearLookAt_Func");
TriggerAddEventUnitBecomesIdle(gt_NarudIdleClearLookAt, UnitRefFromVariable("gv_narud"), true);
}