# Set Boss Bar Boss

Grammar — Set boss bar bossBarID boss to boss (refresh|Do/Do Not refresh the boss bar)
FlagsAction

Sets the unit for the specified boss bar. Calling this action will overwrite the maximum and current value you set through “Set Boss Bar Maximum Value” and “Set Boss Bar Current Value”, and will instead base its value on the specified unit’s HP.

# Arguments

Returns — void

void libNtve_gf_SetBossBarBoss(
	int lp_bossBarID,
	unit lp_boss,
	bool lp_refresh,
);

Category: UI / Boss Bar

# Examples

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thorner01.sc2map/MapScript.galaxy:1935

                    gf_ActivatePingforTrainCar(UnitLastCreated());
                    gv_trainBossBarIndex = lv_trainsToSpawn[lv_i];
                    libNtve_gf_SetBossBarBoss(1, gv_trainList[gv_trainBossBarIndex].lv_trainCars[1], true);
                    gv_trainToBeEscorted = lv_trainsToSpawn[lv_i];
                    TriggerExecute(gt_SpawnEscorts, true, false);

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thorner01.sc2map/MapScript.galaxy:2439

        if ((lv_trainIndex == gv_trainBossBarIndex)) {
            if ((UnitIsAlive(gv_trainList[gv_trainBossBarIndex].lv_trainCars[1]) == true)) {
                libNtve_gf_SetBossBarBoss(1, gv_trainList[gv_trainBossBarIndex].lv_trainCars[1], true);
            }
            else {

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thorner03.sc2map/MapScript.galaxy:1271

    libNtve_gf_SetBossBarMaximumValue(gv_odinBossBar, FixedToInt(gv_odinCurrentHealth), true);
    libNtve_gf_SetBossBarCurrentValue(gv_odinBossBar, FixedToInt(UnitGetPropertyFixed(gv_odin, c_unitPropLife, c_unitPropCurrent)), true);
    libNtve_gf_SetBossBarBoss(gv_odinBossBar, UnitFromId(2), true);
    libNtve_gf_MoveBossBar(gv_odinBossBar, c_anchorTop, 0, 50);
    libNtve_gf_ShowHideBossBar(true, gv_odinBossBar);

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/ttychus02.sc2map/MapScript.galaxy:1820

    libNtve_gf_SetBossBarMaximumValue(gv_templeDoorBossBar, FixedToInt(UnitGetPropertyFixed(gv_tHEONEDRILL, c_unitPropLife, c_unitPropNormal)), true);
    libNtve_gf_SetBossBarCurrentValue(gv_templeDoorBossBar, FixedToInt(UnitGetPropertyFixed(gv_tHEONEDOOR, c_unitPropLife, c_unitPropCurrent)), true);
    libNtve_gf_SetBossBarBoss(gv_templeDoorBossBar, UnitFromId(125), true);
    libNtve_gf_MoveBossBar(gv_templeDoorBossBar, c_anchorTop, 0, 50);
    libNtve_gf_SetBossBarRace(gv_templeDoorBossBar, libNtve_ge_BossBarRace_Protoss, true);

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/thorner01.sc2mapMapScript.galaxy:1935

                    gf_ActivatePingforTrainCar(UnitLastCreated());
                    gv_trainBossBarIndex = lv_trainsToSpawn[lv_i];
                    libNtve_gf_SetBossBarBoss(1, gv_trainList[gv_trainBossBarIndex].lv_trainCars[1], true);
                    gv_trainToBeEscorted = lv_trainsToSpawn[lv_i];
                    TriggerExecute(gt_SpawnEscorts, true, false);

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/thorner01.sc2mapMapScript.galaxy:2439

        if ((lv_trainIndex == gv_trainBossBarIndex)) {
            if ((UnitIsAlive(gv_trainList[gv_trainBossBarIndex].lv_trainCars[1]) == true)) {
                libNtve_gf_SetBossBarBoss(1, gv_trainList[gv_trainBossBarIndex].lv_trainCars[1], true);
            }
            else {

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/thorner03.sc2mapMapScript.galaxy:1271

    libNtve_gf_SetBossBarMaximumValue(gv_odinBossBar, FixedToInt(gv_odinCurrentHealth), true);
    libNtve_gf_SetBossBarCurrentValue(gv_odinBossBar, FixedToInt(UnitGetPropertyFixed(gv_odin, c_unitPropLife, c_unitPropCurrent)), true);
    libNtve_gf_SetBossBarBoss(gv_odinBossBar, UnitFromId(2), true);
    libNtve_gf_MoveBossBar(gv_odinBossBar, c_anchorTop, 0, 50);
    libNtve_gf_ShowHideBossBar(true, gv_odinBossBar);

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttychus02.sc2mapMapScript.galaxy:1820

    libNtve_gf_SetBossBarMaximumValue(gv_templeDoorBossBar, FixedToInt(UnitGetPropertyFixed(gv_tHEONEDRILL, c_unitPropLife, c_unitPropNormal)), true);
    libNtve_gf_SetBossBarCurrentValue(gv_templeDoorBossBar, FixedToInt(UnitGetPropertyFixed(gv_tHEONEDOOR, c_unitPropLife, c_unitPropCurrent)), true);
    libNtve_gf_SetBossBarBoss(gv_templeDoorBossBar, UnitFromId(125), true);
    libNtve_gf_MoveBossBar(gv_templeDoorBossBar, c_anchorTop, 0, 50);
    libNtve_gf_SetBossBarRace(gv_templeDoorBossBar, libNtve_ge_BossBarRace_Protoss, true);