# Set Boss Bar Maximum Value
Grammar — Set boss bar bossBarID maximum value to max (refresh|Do/Do Not refresh the boss bar)
Flags —Action
Sets the maximum value for the specified boss bar. Calling this action will overwrite the boss unit you set through “Set Boss Bar Boss”, and will instead rely on the values sent to it through “Set Boss Bar Maximum Value” and “Set Boss Bar Current Value”.
# Arguments
int
— BossBarIDint
— Maxbool
<preset::Do_Do_Not_Option> — Refresh
Returns — void
void libNtve_gf_SetBossBarMaximumValue(
int lp_bossBarID,
int lp_max,
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/thanson03a.sc2map/MapScript.galaxy:1209
gv_purifierBossBar = 1;
libNtve_gf_SetBossBarRace(gv_purifierBossBar, libNtve_ge_BossBarRace_Protoss, true);
libNtve_gf_SetBossBarMaximumValue(gv_purifierBossBar, FixedToInt(UnitGetPropertyFixed(gv_purifier, c_unitPropLifeMax, c_unitPropCurrent)), true);
libNtve_gf_SetBossBarCurrentValue(gv_purifierBossBar, FixedToInt(UnitGetPropertyFixed(gv_purifier, c_unitPropLife, c_unitPropCurrent)), true);
libNtve_gf_MoveBossBar(gv_purifierBossBar, c_anchorTop, 0, 50);
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/thorner03.sc2map/MapScript.galaxy:1269
gv_odinBossBar = 1;
libNtve_gf_SetBossBarRace(gv_odinBossBar, libNtve_ge_BossBarRace_Terran, true);
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);
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/ttychus02.sc2map/MapScript.galaxy:1818
libNtve_gf_DisplayBossBar(1, "Assets\\Textures\\btn-tips-relicshrine.dds", StringExternal("Param/Value/7AE87D2E"), 100, PlayerGroupAll());
gv_templeDoorBossBar = 1;
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);
campaigns/liberty.sc2campaign — base.sc2maps/maps/campaign/tvalerian02a.sc2map/MapScript.galaxy:7291
gv__3QueenBossBarIndex = 1;
libNtve_gf_DisplayBossBar(gv__3QueenBossBarIndex, "Assets\\Textures\\btn-unit-zerg-queen.dds", StringExternal("Param/Value/070AAF64"), 100, PlayerGroupAll());
libNtve_gf_SetBossBarMaximumValue(gv__3QueenBossBarIndex, FixedToInt(UnitGetPropertyFixed(gv_tHEONEBROODMOTHER, c_unitPropLifeMax, c_unitPropCurrent)), true);
libNtve_gf_SetBossBarCurrentValue(gv__3QueenBossBarIndex, FixedToInt(UnitGetPropertyFixed(gv_tHEONEBROODMOTHER, c_unitPropLife, c_unitPropCurrent)), true);
libNtve_gf_SetBossBarRace(gv__3QueenBossBarIndex, libNtve_ge_BossBarRace_Zerg, true);
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/thanson03a.sc2map — MapScript.galaxy:1209
gv_purifierBossBar = 1;
libNtve_gf_SetBossBarRace(gv_purifierBossBar, libNtve_ge_BossBarRace_Protoss, true);
libNtve_gf_SetBossBarMaximumValue(gv_purifierBossBar, FixedToInt(UnitGetPropertyFixed(gv_purifier, c_unitPropLifeMax, c_unitPropCurrent)), true);
libNtve_gf_SetBossBarCurrentValue(gv_purifierBossBar, FixedToInt(UnitGetPropertyFixed(gv_purifier, c_unitPropLife, c_unitPropCurrent)), true);
libNtve_gf_MoveBossBar(gv_purifierBossBar, c_anchorTop, 0, 50);
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/thorner03.sc2map — MapScript.galaxy:1269
gv_odinBossBar = 1;
libNtve_gf_SetBossBarRace(gv_odinBossBar, libNtve_ge_BossBarRace_Terran, true);
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);
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/ttychus02.sc2map — MapScript.galaxy:1818
libNtve_gf_DisplayBossBar(1, "Assets\\Textures\\btn-tips-relicshrine.dds", StringExternal("Param/Value/7AE87D2E"), 100, PlayerGroupAll());
gv_templeDoorBossBar = 1;
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);
campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tvalerian02a.sc2map — MapScript.galaxy:7291
gv__3QueenBossBarIndex = 1;
libNtve_gf_DisplayBossBar(gv__3QueenBossBarIndex, "Assets\\Textures\\btn-unit-zerg-queen.dds", StringExternal("Param/Value/070AAF64"), 100, PlayerGroupAll());
libNtve_gf_SetBossBarMaximumValue(gv__3QueenBossBarIndex, FixedToInt(UnitGetPropertyFixed(gv_tHEONEBROODMOTHER, c_unitPropLifeMax, c_unitPropCurrent)), true);
libNtve_gf_SetBossBarCurrentValue(gv__3QueenBossBarIndex, FixedToInt(UnitGetPropertyFixed(gv_tHEONEBROODMOTHER, c_unitPropLife, c_unitPropCurrent)), true);
libNtve_gf_SetBossBarRace(gv__3QueenBossBarIndex, libNtve_ge_BossBarRace_Zerg, true);
mods/core.sc2mod — base.sc2data/TriggerLibs/NativeLib.galaxy:4785
libNtve_gv__BB_Title[lp_bossBarID] = lp_title;
libNtve_gv__BB_Boss[lp_bossBarID] = null;
libNtve_gf_SetBossBarMaximumValue(lp_bossBarID, lp_max, false);
libNtve_gf_SetBossBarCurrentValue(lp_bossBarID, lp_max, false);
libNtve_gv__BB_HPOldWidth[lp_bossBarID] = -1;
mods/core.stormmod — base.stormdata/TriggerLibs/NativeLib.galaxy:4030
libNtve_gv__BB_Title[lp_bossBarID] = lp_title;
libNtve_gv__BB_Boss[lp_bossBarID] = null;
libNtve_gf_SetBossBarMaximumValue(lp_bossBarID, lp_max, false);
libNtve_gf_SetBossBarCurrentValue(lp_bossBarID, lp_max, false);
libNtve_gv__BB_HPOldWidth[lp_bossBarID] = -1;