# Set Unit Status Bar State (Deprecated)

Grammar — Set forced status bar state on unit to value|On/Off
FlagsNative | Action | Hidden

Forces the status bar on or off for the specified unit.

# Arguments

Returns — void

native void UnitForceStatusBar(unit inUnit, bool inShow);

Category: Unit / Properties

# Examples

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thanson03a.sc2map/MapScript.galaxy:1297

    UnitBehaviorAdd(gv_purifier, "ProgressBar", gv_purifier, 1);
    UnitBehaviorSetDuration(gv_purifier, "ProgressBar", FixedToInt(TimerGetRemaining(gv_poweringUpTime)));
    UnitForceStatusBar(gv_purifier, true);
    UIAlertUnit("Trigger", gv_pLAYER01_USER, StringExternal("Param/Value/BFCA447F"), null, gv_purifier);
    lv_aLERT_WAIT_TIME = (SoundLengthSync(SoundLink("THanson03AHorner00003", -1)) + SoundLengthSync(SoundLink("UI_TerranKlaxonAlert", -1)));

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thanson03a.sc2map/MapScript.galaxy:1397

    UnitBehaviorAdd(gv_purifier, "ProgressBar", gv_purifier, 1);
    UnitBehaviorSetDuration(gv_purifier, "ProgressBar", FixedToInt(TimerGetRemaining(gv_poweringUpTime)));
    UnitForceStatusBar(gv_purifier, true);
    UIAlertUnit("Trigger", gv_pLAYER01_USER, StringExternal("Param/Value/BF5546F5"), null, gv_purifier);
    lv_aLERT_WAIT_TIME = (SoundLengthSync(SoundLink("THanson03AHanson00009", -1)) + SoundLengthSync(SoundLink("UI_TerranKlaxonAlert", -1)));

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thanson03a.sc2map/MapScript.galaxy:1507

    UnitBehaviorAdd(gv_purifier, "ProgressBar", gv_purifier, 1);
    UnitBehaviorSetDuration(gv_purifier, "ProgressBar", FixedToInt(TimerGetRemaining(gv_poweringUpTime)));
    UnitForceStatusBar(gv_purifier, true);
    UIAlertUnit("Trigger", gv_pLAYER01_USER, StringExternal("Param/Value/D1A1218F"), null, gv_purifier);
    lv_aLERT_WAIT_TIME = (SoundLengthSync(SoundLink("THanson03AHorner00008", -1)) + SoundLengthSync(SoundLink("UI_TerranKlaxonAlert", -1)));

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thanson03a.sc2map/MapScript.galaxy:1621

    UnitBehaviorAdd(gv_purifier, "ProgressBar", gv_purifier, 1);
    UnitBehaviorSetDuration(gv_purifier, "ProgressBar", FixedToInt(TimerGetRemaining(gv_poweringUpTime)));
    UnitForceStatusBar(gv_purifier, true);
    UIAlertUnit("Trigger", gv_pLAYER01_USER, StringExternal("Param/Value/F6DE8350"), null, gv_purifier);
    lv_aLERT_WAIT_TIME = (SoundLengthSync(SoundLink("THanson03ARaynor00005", -1)) + SoundLengthSync(SoundLink("UI_TerranKlaxonAlert", -1)));

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thanson03a.sc2map/MapScript.galaxy:1728

    UnitBehaviorAdd(gv_purifier, "ProgressBar", gv_purifier, 1);
    UnitBehaviorSetDuration(gv_purifier, "ProgressBar", FixedToInt(TimerGetRemaining(gv_poweringUpTime)));
    UnitForceStatusBar(gv_purifier, true);
    UIAlertUnit("Trigger", gv_pLAYER01_USER, StringExternal("Param/Value/CCF54A48"), null, gv_purifier);
    lv_aLERT_WAIT_TIME = (SoundLengthSync(SoundLink("THanson03ARaynor00006", -1)) + SoundLengthSync(SoundLink("UI_TerranKlaxonAlert", -1)));

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thanson03b.sc2map/MapScript.galaxy:1511

    gv_infestationVirophageUnit[lv_colonyIndex] = EventUnitProgressUnit();
    UnitSetCustomValue(gv_infestationVirophageUnit[lv_colonyIndex], 1, IntToFixed(lv_colonyIndex));
    UnitForceStatusBar(EventUnitProgressUnit(), true);
    UnitSetInfoText(EventUnitProgressUnit(), StringToText(""), StringExternal("Param/Value/55694EB6"), StringExternal("Param/Value/A5396465"));
    UnitSetState(EventUnitProgressUnit(), c_unitStateTooltipable, true);

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thanson03b.sc2map/MapScript.galaxy:1569

    gv_infestationColonyLost[lv_colonyIndex] = true;
    gv_stat_ColoniesSaved -= 1;
    UnitForceStatusBar(EventUnitProgressUnit(), false);
    UnitSetInfoText(EventUnitProgressUnit(), StringToText(""), StringExternal("Param/Value/3096EE9E"), StringExternal("Param/Value/E181F205"));
    UnitSetState(EventUnitProgressUnit(), c_unitStateTooltipable, true);

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

    UnitSetCustomValue(lv_harvestingSCV, 0, UnitGetCustomValue(EventUnitTargetUnit(), 0));
    UnitBehaviorAdd(lv_harvestingSCV, "ProgressBar", lv_harvestingSCV, 1);
    UnitForceStatusBar(EventUnitTargetUnit(), true);
    if ((UnitGetType(EventUnitTargetUnit()) == "TerrazineNode")) {
        UnitBehaviorSetDuration(lv_harvestingSCV, "ProgressBar", 60);

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

    UnitBehaviorRemove(gf_NodeMatchingCustomValue(FixedToInt(UnitGetCustomValue(EventUnit(), 0))), "TerrazineCountdownDummyBar", 1);
    UnitBehaviorRemove(gf_NodeMatchingCustomValue(FixedToInt(UnitGetCustomValue(EventUnit(), 0))), "TerrazineCountdownDummyBarFaster", 1);
    UnitForceStatusBar(gf_NodeMatchingCustomValue(FixedToInt(UnitGetCustomValue(EventUnit(), 0))), false);
    AIAttackWaveCancel(gv_terrazineAttackWaves[FixedToInt(UnitGetCustomValue(EventUnit(), 0))][1]);
    AIAttackWaveCancel(gv_terrazineAttackWaves[FixedToInt(UnitGetCustomValue(EventUnit(), 0))][2]);

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

    UnitSetCustomValue(EventUnit(), 0, UnitGetCustomValue(EventUnitTargetUnit(), 0));
    UIAlertPoint("Trigger", gv_p1_USER, StringExternal("Param/Value/8CA221DD"), "Assets\\Textures\\btn-unit-protoss-probe.dds", UnitGetPosition(EventUnit()));
    UnitForceStatusBar(EventUnitTargetUnit(), true);
    if ((UnitGetType(EventUnitTargetUnit()) == "TerrazineNode")) {
        UnitBehaviorAdd(EventUnitTargetUnit(), "TerrazineCountdownDummyBar", EventUnitTargetUnit(), 1);

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

    UnitBehaviorRemove(gf_NodeMatchingCustomValue(FixedToInt(UnitGetCustomValue(EventUnit(), 0))), "TerrazineCountdownDummyBar", 1);
    UnitBehaviorRemove(gf_NodeMatchingCustomValue(FixedToInt(UnitGetCustomValue(EventUnit(), 0))), "TerrazineCountdownDummyBarFaster", 1);
    UnitForceStatusBar(gf_NodeMatchingCustomValue(FixedToInt(UnitGetCustomValue(EventUnit(), 0))), false);
    PingDestroy(gv_protossHarvesterPings[FixedToInt(UnitGetCustomValue(EventUnit(), 0))]);
    auto16B0C7AE_g = AIGetAllEscortsGroup(libNtve_gf_ConvertUnitToUnitGroup(EventUnit()));

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/ttychus03.sc2map/MapScript.galaxy:2521

        UnitBehaviorAdd(gv_uNIT_KERRIGAN, "ProgressBar", gv_uNIT_KERRIGAN, 1);
        UnitBehaviorSetDuration(gv_uNIT_KERRIGAN, "ProgressBar", FixedToInt(TimerGetRemaining(gv_kerriganSearchTimer)));
        UnitForceStatusBar(gv_uNIT_KERRIGAN, true);
        UnitIssueOrder(EventUnit(), OrderTargetingUnit(AbilityCommand("KerriganSearch", 0), lv_tARGETunit), c_orderQueueReplace);
        TriggerExecute(gt_KerriganTauntsRaynor1Q, true, false);

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/thanson03a.sc2mapMapScript.galaxy:1297

    UnitBehaviorAdd(gv_purifier, "ProgressBar", gv_purifier, 1);
    UnitBehaviorSetDuration(gv_purifier, "ProgressBar", FixedToInt(TimerGetRemaining(gv_poweringUpTime)));
    UnitForceStatusBar(gv_purifier, true);
    UIAlertUnit("Trigger", gv_pLAYER01_USER, StringExternal("Param/Value/BFCA447F"), null, gv_purifier);
    lv_aLERT_WAIT_TIME = (SoundLengthSync(SoundLink("THanson03AHorner00003", -1)) + SoundLengthSync(SoundLink("UI_TerranKlaxonAlert", -1)));

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/thanson03a.sc2mapMapScript.galaxy:1397

    UnitBehaviorAdd(gv_purifier, "ProgressBar", gv_purifier, 1);
    UnitBehaviorSetDuration(gv_purifier, "ProgressBar", FixedToInt(TimerGetRemaining(gv_poweringUpTime)));
    UnitForceStatusBar(gv_purifier, true);
    UIAlertUnit("Trigger", gv_pLAYER01_USER, StringExternal("Param/Value/BF5546F5"), null, gv_purifier);
    lv_aLERT_WAIT_TIME = (SoundLengthSync(SoundLink("THanson03AHanson00009", -1)) + SoundLengthSync(SoundLink("UI_TerranKlaxonAlert", -1)));

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/thanson03a.sc2mapMapScript.galaxy:1507

    UnitBehaviorAdd(gv_purifier, "ProgressBar", gv_purifier, 1);
    UnitBehaviorSetDuration(gv_purifier, "ProgressBar", FixedToInt(TimerGetRemaining(gv_poweringUpTime)));
    UnitForceStatusBar(gv_purifier, true);
    UIAlertUnit("Trigger", gv_pLAYER01_USER, StringExternal("Param/Value/D1A1218F"), null, gv_purifier);
    lv_aLERT_WAIT_TIME = (SoundLengthSync(SoundLink("THanson03AHorner00008", -1)) + SoundLengthSync(SoundLink("UI_TerranKlaxonAlert", -1)));

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/thanson03a.sc2mapMapScript.galaxy:1621

    UnitBehaviorAdd(gv_purifier, "ProgressBar", gv_purifier, 1);
    UnitBehaviorSetDuration(gv_purifier, "ProgressBar", FixedToInt(TimerGetRemaining(gv_poweringUpTime)));
    UnitForceStatusBar(gv_purifier, true);
    UIAlertUnit("Trigger", gv_pLAYER01_USER, StringExternal("Param/Value/F6DE8350"), null, gv_purifier);
    lv_aLERT_WAIT_TIME = (SoundLengthSync(SoundLink("THanson03ARaynor00005", -1)) + SoundLengthSync(SoundLink("UI_TerranKlaxonAlert", -1)));

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/thanson03a.sc2mapMapScript.galaxy:1728

    UnitBehaviorAdd(gv_purifier, "ProgressBar", gv_purifier, 1);
    UnitBehaviorSetDuration(gv_purifier, "ProgressBar", FixedToInt(TimerGetRemaining(gv_poweringUpTime)));
    UnitForceStatusBar(gv_purifier, true);
    UIAlertUnit("Trigger", gv_pLAYER01_USER, StringExternal("Param/Value/CCF54A48"), null, gv_purifier);
    lv_aLERT_WAIT_TIME = (SoundLengthSync(SoundLink("THanson03ARaynor00006", -1)) + SoundLengthSync(SoundLink("UI_TerranKlaxonAlert", -1)));

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/thanson03b.sc2mapMapScript.galaxy:1511

    gv_infestationVirophageUnit[lv_colonyIndex] = EventUnitProgressUnit();
    UnitSetCustomValue(gv_infestationVirophageUnit[lv_colonyIndex], 1, IntToFixed(lv_colonyIndex));
    UnitForceStatusBar(EventUnitProgressUnit(), true);
    UnitSetInfoText(EventUnitProgressUnit(), StringToText(""), StringExternal("Param/Value/55694EB6"), StringExternal("Param/Value/A5396465"));
    UnitSetState(EventUnitProgressUnit(), c_unitStateTooltipable, true);

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/thanson03b.sc2mapMapScript.galaxy:1569

    gv_infestationColonyLost[lv_colonyIndex] = true;
    gv_stat_ColoniesSaved -= 1;
    UnitForceStatusBar(EventUnitProgressUnit(), false);
    UnitSetInfoText(EventUnitProgressUnit(), StringToText(""), StringExternal("Param/Value/3096EE9E"), StringExternal("Param/Value/E181F205"));
    UnitSetState(EventUnitProgressUnit(), c_unitStateTooltipable, true);

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

    UnitSetCustomValue(lv_harvestingSCV, 0, UnitGetCustomValue(EventUnitTargetUnit(), 0));
    UnitBehaviorAdd(lv_harvestingSCV, "ProgressBar", lv_harvestingSCV, 1);
    UnitForceStatusBar(EventUnitTargetUnit(), true);
    if ((UnitGetType(EventUnitTargetUnit()) == "TerrazineNode")) {
        UnitBehaviorSetDuration(lv_harvestingSCV, "ProgressBar", 60);

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

    UnitBehaviorRemove(gf_NodeMatchingCustomValue(FixedToInt(UnitGetCustomValue(EventUnit(), 0))), "TerrazineCountdownDummyBar", 1);
    UnitBehaviorRemove(gf_NodeMatchingCustomValue(FixedToInt(UnitGetCustomValue(EventUnit(), 0))), "TerrazineCountdownDummyBarFaster", 1);
    UnitForceStatusBar(gf_NodeMatchingCustomValue(FixedToInt(UnitGetCustomValue(EventUnit(), 0))), false);
    AIAttackWaveCancel(gv_terrazineAttackWaves[FixedToInt(UnitGetCustomValue(EventUnit(), 0))][1]);
    AIAttackWaveCancel(gv_terrazineAttackWaves[FixedToInt(UnitGetCustomValue(EventUnit(), 0))][2]);

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

    UnitSetCustomValue(EventUnit(), 0, UnitGetCustomValue(EventUnitTargetUnit(), 0));
    UIAlertPoint("Trigger", gv_p1_USER, StringExternal("Param/Value/8CA221DD"), "Assets\\Textures\\btn-unit-protoss-probe.dds", UnitGetPosition(EventUnit()));
    UnitForceStatusBar(EventUnitTargetUnit(), true);
    if ((UnitGetType(EventUnitTargetUnit()) == "TerrazineNode")) {
        UnitBehaviorAdd(EventUnitTargetUnit(), "TerrazineCountdownDummyBar", EventUnitTargetUnit(), 1);

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

    UnitBehaviorRemove(gf_NodeMatchingCustomValue(FixedToInt(UnitGetCustomValue(EventUnit(), 0))), "TerrazineCountdownDummyBar", 1);
    UnitBehaviorRemove(gf_NodeMatchingCustomValue(FixedToInt(UnitGetCustomValue(EventUnit(), 0))), "TerrazineCountdownDummyBarFaster", 1);
    UnitForceStatusBar(gf_NodeMatchingCustomValue(FixedToInt(UnitGetCustomValue(EventUnit(), 0))), false);
    PingDestroy(gv_protossHarvesterPings[FixedToInt(UnitGetCustomValue(EventUnit(), 0))]);
    auto16B0C7AE_g = AIGetAllEscortsGroup(libNtve_gf_ConvertUnitToUnitGroup(EventUnit()));

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttychus03.sc2mapMapScript.galaxy:2521

        UnitBehaviorAdd(gv_uNIT_KERRIGAN, "ProgressBar", gv_uNIT_KERRIGAN, 1);
        UnitBehaviorSetDuration(gv_uNIT_KERRIGAN, "ProgressBar", FixedToInt(TimerGetRemaining(gv_kerriganSearchTimer)));
        UnitForceStatusBar(gv_uNIT_KERRIGAN, true);
        UnitIssueOrder(EventUnit(), OrderTargetingUnit(AbilityCommand("KerriganSearch", 0), lv_tARGETunit), c_orderQueueReplace);
        TriggerExecute(gt_KerriganTauntsRaynor1Q, true, false);

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

    SoundtrackPlay(PlayerGroupAll(), c_soundtrackCategoryAmbience, "Ambience_Lab02Level01", c_soundtrackCueAny, c_soundtrackIndexAny, true);
    UnitSetInfoText(UnitFromId(40), StringExternal("Param/Value/A4CE4625"), StringExternal("Param/Value/FF783F03"), StringToText(""));
    UnitForceStatusBar(UnitFromId(40), true);
    UnitSetState(UnitFromId(40), c_unitStateHighlighted, true);
    UnitSetInfoText(UnitFromId(330), StringExternal("Param/Value/E7FB0CA2"), StringExternal("Param/Value/A03EB1BF"), StringToText(""));

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

    UnitSetState(UnitFromId(40), c_unitStateHighlighted, true);
    UnitSetInfoText(UnitFromId(330), StringExternal("Param/Value/E7FB0CA2"), StringExternal("Param/Value/A03EB1BF"), StringToText(""));
    UnitForceStatusBar(UnitFromId(330), true);
    UnitSetInfoText(UnitFromId(373), StringExternal("Param/Value/BEF8D18C"), StringExternal("Param/Value/D6E66496"), StringToText(""));
    UnitForceStatusBar(UnitFromId(373), true);

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

    UnitForceStatusBar(UnitFromId(330), true);
    UnitSetInfoText(UnitFromId(373), StringExternal("Param/Value/BEF8D18C"), StringExternal("Param/Value/D6E66496"), StringToText(""));
    UnitForceStatusBar(UnitFromId(373), true);
    UnitSetInfoText(UnitFromId(308), StringExternal("Param/Value/F4FFC5CC"), StringExternal("Param/Value/9CC15B14"), StringToText(""));
    UnitForceStatusBar(UnitFromId(308), true);

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

    UnitForceStatusBar(UnitFromId(373), true);
    UnitSetInfoText(UnitFromId(308), StringExternal("Param/Value/F4FFC5CC"), StringExternal("Param/Value/9CC15B14"), StringToText(""));
    UnitForceStatusBar(UnitFromId(308), true);
    libNtve_gf_PlayAnimationOnDoodadsInRegion(RegionFromId(108), "UmojanLabLabGate", c_animNameDefault, "Stand Unpowered", c_animFlagPlayForever | c_animFlagNonLooping, c_animTimeDefault);
    libNtve_gf_PlayAnimationOnDoodadsInRegion(RegionFromId(109), "UmojanLabLabGate", c_animNameDefault, "Stand Unpowered", c_animFlagPlayForever | c_animFlagNonLooping, c_animTimeDefault);

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

    SoundtrackPlay(PlayerGroupAll(), c_soundtrackCategoryAmbience, "Ambience_Lab02Level01", c_soundtrackCueAny, c_soundtrackIndexAny, true);
    UnitSetInfoText(UnitFromId(40), StringExternal("Param/Value/A4CE4625"), StringExternal("Param/Value/FF783F03"), StringToText(""));
    UnitForceStatusBar(UnitFromId(40), true);
    UnitSetState(UnitFromId(40), c_unitStateHighlighted, true);
    UnitSetInfoText(UnitFromId(330), StringExternal("Param/Value/E7FB0CA2"), StringExternal("Param/Value/A03EB1BF"), StringToText(""));

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

    UnitSetState(UnitFromId(40), c_unitStateHighlighted, true);
    UnitSetInfoText(UnitFromId(330), StringExternal("Param/Value/E7FB0CA2"), StringExternal("Param/Value/A03EB1BF"), StringToText(""));
    UnitForceStatusBar(UnitFromId(330), true);
    UnitSetInfoText(UnitFromId(373), StringExternal("Param/Value/BEF8D18C"), StringExternal("Param/Value/D6E66496"), StringToText(""));
    UnitForceStatusBar(UnitFromId(373), true);

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

    UnitForceStatusBar(UnitFromId(330), true);
    UnitSetInfoText(UnitFromId(373), StringExternal("Param/Value/BEF8D18C"), StringExternal("Param/Value/D6E66496"), StringToText(""));
    UnitForceStatusBar(UnitFromId(373), true);
    UnitSetInfoText(UnitFromId(308), StringExternal("Param/Value/F4FFC5CC"), StringExternal("Param/Value/9CC15B14"), StringToText(""));
    UnitForceStatusBar(UnitFromId(308), true);

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

    UnitForceStatusBar(UnitFromId(373), true);
    UnitSetInfoText(UnitFromId(308), StringExternal("Param/Value/F4FFC5CC"), StringExternal("Param/Value/9CC15B14"), StringToText(""));
    UnitForceStatusBar(UnitFromId(308), true);
    libNtve_gf_PlayAnimationOnDoodadsInRegion(RegionFromId(108), "UmojanLabLabGate", c_animNameDefault, "Stand Unpowered", c_animFlagPlayForever | c_animFlagNonLooping, c_animTimeDefault);
    libNtve_gf_PlayAnimationOnDoodadsInRegion(RegionFromId(109), "UmojanLabLabGate", c_animNameDefault, "Stand Unpowered", c_animFlagPlayForever | c_animFlagNonLooping, c_animTimeDefault);