# Set Boss Bar Boss
Grammar — Set boss bar bossBarID boss to boss (refresh|Do/Do Not refresh the boss bar)
Flags —Action
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
int
— BossBarIDunit
— Bossbool
<preset::Do_Do_Not_Option> — Refresh
Returns — void
void libNtve_gf_SetBossBarBoss(
int lp_bossBarID,
unit lp_boss,
bool lp_refresh,
);
# Related
Category: UI / Boss Bar
- Display Boss Bar —
void
— libNtve_gf_DisplayBossBar - Set Boss Bar Maximum Value —
void
— libNtve_gf_SetBossBarMaximumValue - Set Boss Bar Current Value —
void
— libNtve_gf_SetBossBarCurrentValue - Set Boss Bar Boss —
void
— libNtve_gf_SetBossBarBoss - Boss Bar Race — preset —
int
- Set Boss Bar Race —
void
— libNtve_gf_SetBossBarRace - Move Boss Bar —
void
— libNtve_gf_MoveBossBar - Show/Hide Boss Bar —
void
— libNtve_gf_ShowHideBossBar - Refresh Boss Bar —
void
— libNtve_gf_RefreshBossBar
# Examples
campaigns/liberty.sc2campaign — base.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.sc2campaign — base.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.sc2campaign — base.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.sc2campaign — base.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.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.sc2campaign/base.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.sc2campaign/base.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.sc2campaign/base.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);