2025-03-08 23:59:49 -05:00
< !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
< html >
< meta http-equiv = "Content-Type" content = "text/html; charset=UTF-8" / >
< head >
2025-03-28 23:39:49 +01:00
< title > TombEngine 1.8.1 Lua API< / title >
2025-03-08 23:59:49 -05:00
< link rel = "stylesheet" href = "../ldoc.css" type = "text/css" / >
< / head >
< body >
< div id = "container" >
< div id = "product" >
< div id = "product_logo" > < / div >
< div id = "product_name" > < big > < b > < / b > < / big > < / div >
< div id = "product_description" > < / div >
< / div > <!-- id="product" -->
< div id = "main" >
<!-- Menu -->
< div id = "navigation" >
< br / >
< h1 > TombEngine< / h1 >
< ul >
< li > < a href = "../index.html" > Index< / a > < / li >
< / ul >
< h2 > 1 Modules< / h2 >
< ul class = "nowrap" >
< li > < a href = "../1 modules/Effects.html" > Effects< / a > < / li >
< li > < a href = "../1 modules/Flow.html" > Flow< / a > < / li >
< li > < a href = "../1 modules/Input.html" > Input< / a > < / li >
< li > < a href = "../1 modules/Inventory.html" > Inventory< / a > < / li >
< li > < a href = "../1 modules/Logic.html" > Logic< / a > < / li >
< li > < a href = "../1 modules/Objects.html" > Objects< / a > < / li >
< li > < a href = "../1 modules/Sound.html" > Sound< / a > < / li >
< li > < a href = "../1 modules/Strings.html" > Strings< / a > < / li >
< li > < a href = "../1 modules/Util.html" > Util< / a > < / li >
< li > < a href = "../1 modules/View.html" > View< / a > < / li >
< / ul >
< h2 > 2 Classes< / h2 >
< ul class = "nowrap" >
< li > < a href = "../2 classes/Collision.Probe.html" > Collision.Probe< / a > < / li >
< li > < a href = "../2 classes/Flow.Level.html" > Flow.Level< / a > < / li >
< li > < a href = "../2 classes/Flow.Settings.html" > Flow.Settings< / a > < / li >
< li > < a href = "../2 classes/Flow.Statistics.html" > Flow.Statistics< / a > < / li >
< li > < a href = "../2 classes/Objects.AIObject.html" > Objects.AIObject< / a > < / li >
< li > < a href = "../2 classes/Objects.Camera.html" > Objects.Camera< / a > < / li >
< li > < a href = "../2 classes/Objects.LaraObject.html" > Objects.LaraObject< / a > < / li >
< li > < a href = "../2 classes/Objects.Moveable.html" > Objects.Moveable< / a > < / li >
< li > < a href = "../2 classes/Objects.Room.html" > Objects.Room< / a > < / li >
< li > < a href = "../2 classes/Objects.Sink.html" > Objects.Sink< / a > < / li >
< li > < a href = "../2 classes/Objects.SoundSource.html" > Objects.SoundSource< / a > < / li >
< li > < a href = "../2 classes/Objects.Static.html" > Objects.Static< / a > < / li >
< li > < a href = "../2 classes/Objects.Volume.html" > Objects.Volume< / a > < / li >
< li > < a href = "../2 classes/Strings.DisplayString.html" > Strings.DisplayString< / a > < / li >
< li > < a href = "../2 classes/View.DisplaySprite.html" > View.DisplaySprite< / a > < / li >
< / ul >
< h2 > 3 Primitive Classes< / h2 >
< ul class = "nowrap" >
< li > < a href = "../3 primitive classes/Flow.Fog.html" > Flow.Fog< / a > < / li >
< li > < a href = "../3 primitive classes/Flow.Horizon.html" > Flow.Horizon< / a > < / li >
< li > < a href = "../3 primitive classes/Flow.InventoryItem.html" > Flow.InventoryItem< / a > < / li >
< li > < a href = "../3 primitive classes/Flow.LensFlare.html" > Flow.LensFlare< / a > < / li >
< li > < a href = "../3 primitive classes/Flow.SkyLayer.html" > Flow.SkyLayer< / a > < / li >
2025-03-15 01:01:05 +01:00
< li > < a href = "../3 primitive classes/Flow.Starfield.html" > Flow.Starfield< / a > < / li >
2025-03-08 23:59:49 -05:00
< li > < a href = "../3 primitive classes/Color.html" > Color< / a > < / li >
< li > < a href = "../3 primitive classes/Rotation.html" > Rotation< / a > < / li >
< li > < a href = "../3 primitive classes/Time.html" > Time< / a > < / li >
< li > < a href = "../3 primitive classes/Vec2.html" > Vec2< / a > < / li >
< li > < a href = "../3 primitive classes/Vec3.html" > Vec3< / a > < / li >
< / ul >
< h2 > 4 Enums< / h2 >
< ul class = "nowrap" >
< li > < a href = "../4 enums/Collision.MaterialType.html" > Collision.MaterialType< / a > < / li >
< li > < a href = "../4 enums/Effects.BlendID.html" > Effects.BlendID< / a > < / li >
< li > < a href = "../4 enums/Effects.EffectID.html" > Effects.EffectID< / a > < / li >
2025-03-15 20:19:13 +01:00
< li > < a href = "../4 enums/Effects.StreamerFeatherMode.html" > Effects.StreamerFeatherMode< / a > < / li >
2025-03-08 23:59:49 -05:00
< li > < a href = "../4 enums/Effects.ParticleAnimationType.html" > Effects.ParticleAnimationType< / a > < / li >
< li > < a href = "../4 enums/Flow.ErrorMode.html" > Flow.ErrorMode< / a > < / li >
< li > < a href = "../4 enums/Flow.FreezeMode.html" > Flow.FreezeMode< / a > < / li >
< li > < a href = "../4 enums/Flow.GameStatus.html" > Flow.GameStatus< / a > < / li >
< li > < a href = "../4 enums/Input.ActionID.html" > Input.ActionID< / a > < / li >
< li > < a href = "../4 enums/Objects.AmmoType.html" > Objects.AmmoType< / a > < / li >
< li > < a href = "../4 enums/Objects.HandStatus.html" > Objects.HandStatus< / a > < / li >
< li > < a href = "../4 enums/Objects.WeaponType.html" > Objects.WeaponType< / a > < / li >
< li > < a href = "../4 enums/Objects.MoveableStatus.html" > Objects.MoveableStatus< / a > < / li >
< li > < a href = "../4 enums/Objects.ObjID.html" > Objects.ObjID< / a > < / li >
< li > < a href = "../4 enums/Objects.RoomFlagID.html" > Objects.RoomFlagID< / a > < / li >
< li > < a href = "../4 enums/Objects.RoomReverb.html" > Objects.RoomReverb< / a > < / li >
< li > < a href = "../4 enums/Sound.SoundTrackType.html" > Sound.SoundTrackType< / a > < / li >
< li > < a href = "../4 enums/Strings.DisplayStringOption.html" > Strings.DisplayStringOption< / a > < / li >
< li > < a href = "../4 enums/Util.LogLevel.html" > Util.LogLevel< / a > < / li >
< li > < a href = "../4 enums/View.AlignMode.html" > View.AlignMode< / a > < / li >
< li > < a href = "../4 enums/View.CameraType.html" > View.CameraType< / a > < / li >
< li > < a href = "../4 enums/View.PostProcessMode.html" > View.PostProcessMode< / a > < / li >
< li > < a href = "../4 enums/View.ScaleMode.html" > View.ScaleMode< / a > < / li >
< / ul >
< h2 > 5 Lua utility modules< / h2 >
< ul class = "nowrap" >
< li > < here > CustomBar< / here > < / li >
< li > < a href = "../5 lua utility modules/Diary.html" > Diary< / a > < / li >
< li > < a href = "../5 lua utility modules/EventSequence.html" > EventSequence< / a > < / li >
< li > < a href = "../5 lua utility modules/Timer.html" > Timer< / a > < / li >
< li > < a href = "../5 lua utility modules/Type.html" > Type< / a > < / li >
< / ul >
< / div >
< div id = "content" >
< h1 > Lua utility module < code > CustomBar< / code > < / h1 >
< p > This module provides functions for creating and managing custom progress bars.< / p >
< p >
< p > It stores bar definitions and configurations in < code > LevelVars.Engine.CustomBars< / code > , enabling seamless state management.
Each bar is independently controlled through its associated functions.< / p >
< p > Example usage:< / p >
< pre >
< span class = "keyword" > local< / span > CustomBar = < span class = "global" > require< / span > (< span class = "string" > "Engine.CustomBar"< / span > )
< span class = "comment" > -- Create a table with all the bar properties
< / span > < span class = "keyword" > local< / span > barData = {
barName = < span class = "string" > "water"< / span > ,
startValue = < span class = "number" > 0< / span > ,
maxValue = < span class = "number" > 1000< / span > ,
objectIdBg = TEN.Objects.ObjID.CUSTOM_BAR_GRAPHIC,
spriteIdBg = < span class = "number" > 0< / span > ,
colorBg = TEN.Color(< span class = "number" > 255< / span > ,< span class = "number" > 255< / span > ,< span class = "number" > 255< / span > ),
posBg = TEN.Vec2(< span class = "number" > 20< / span > , < span class = "number" > 20< / span > ),
rotBg = < span class = "number" > 0< / span > ,
scaleBg = TEN.Vec2(< span class = "number" > 19.05< / span > , < span class = "number" > 19.1< / span > ),
alignModeBg = TEN.View.AlignMode.CENTER_LEFT,
scaleModeBg = TEN.View.ScaleMode.FIT,
blendModeBg = TEN.Effects.BlendID.ALPHABLEND,
objectIdBar = TEN.Objects.ObjID.CUSTOM_BAR_GRAPHIC,
spriteIdBar = < span class = "number" > 1< / span > ,
colorBar = TEN.Color(< span class = "number" > 255< / span > ,< span class = "number" > 0< / span > ,< span class = "number" > 0< / span > ),
posBar = TEN.Vec2(< span class = "number" > 20.15< / span > , < span class = "number" > 20< / span > ),
rot = < span class = "number" > 0< / span > ,
scaleBar = TEN.Vec2(< span class = "number" > 18.7< / span > , < span class = "number" > 18.48< / span > ),
alignMode = TEN.View.AlignMode.CENTER_LEFT,
scaleMode = TEN.View.ScaleMode.FIT,
blendMode = TEN.Effects.BlendID.ALPHABLEND,
text = < span class = "string" > "Water Bar"< / span > ,
textPos = TEN.Vec2(< span class = "number" > 20< / span > , < span class = "number" > 15< / span > ),
textOptions = {TEN.Strings.DisplayStringOption.SHADOW,TEN.Strings.DisplayStringOption.CENTER},
textScale = < span class = "number" > 1< / span > ,
textColor = TEN.Color(< span class = "number" > 255< / span > ,< span class = "number" > 0< / span > ,< span class = "number" > 0< / span > ),
hideText = < span class = "keyword" > false< / span > ,
alphaBlendSpeed = < span class = "number" > 50< / span > ,
blink = < span class = "keyword" > false< / span > ,
blinkLimit = < span class = "number" > 0.25< / span >
}
< span class = "comment" > -- This function creates the bar.
< / span > CustomBar.Create(barData)
< span class = "comment" > -- This method gets the bar with name "water" and stores it in variable bar.
< / span > < span class = "keyword" > local< / span > bar = CustomBar.Get(< span class = "string" > "water"< / span > )
< span class = "comment" > -- This method displays the bar
< / span > bar:SetVisibility(< span class = "keyword" > true< / span > )
< span class = "comment" > -- This method sets the bar value to 1000 over 5 seconds.
< / span > bar:SetBarValue(< span class = "number" > 1000< / span > ,< span class = "number" > 5< / span > )
< / pre >
< / p >
< h2 > < a href = "#Functions" > Functions< / a > < / h2 >
< table class = "function_list" >
< tr >
< td class = "name" > < a href = "#Create" > Create(barData)< / a > < / td >
< td class = "summary" > Creates a custom progress bar with extensive configuration options.< / td >
< / tr >
< tr >
< td class = "name" > < a href = "#CreatePlayerBar" > CreatePlayerBar(playerBarData)< / a > < / td >
< td class = "summary" > Creates a bar tied to Players's attributes (Health, Air, Stamina).< / td >
< / tr >
< tr >
< td class = "name" > < a href = "#CreateEnemyHpBar" > CreateEnemyHpBar(enemyBarData)< / a > < / td >
< td class = "summary" > Creates a custom health bar for a specific enemy (like a boss).< / td >
< / tr >
< tr >
< td class = "name" > < a href = "#SetEnemiesHpGenericBar" > SetEnemiesHpGenericBar(enemiesBarData)< / a > < / td >
< td class = "summary" > Creates health bars for all enemies.< / td >
< / tr >
< tr >
< td class = "name" > < a href = "#Get" > Get(barName)< / a > < / td >
< td class = "summary" > The function retrieves an existing bar instance by its unique identifier (barName).< / td >
< / tr >
< tr >
< td class = "name" > < a href = "#Delete" > Delete(barName)< / a > < / td >
< td class = "summary" > The function removes a custom bar and its associated data from the system.< / td >
< / tr >
< tr >
< td class = "name" > < a href = "#SetBarValue" > SetBarValue(value, time)< / a > < / td >
< td class = "summary" > The function sets the value of a custom bar over a specified time period.< / td >
< / tr >
< tr >
< td class = "name" > < a href = "#ChangeBarValueOverTimespan" > ChangeBarValueOverTimespan(value, time)< / a > < / td >
< td class = "summary" > The function adjusts the bar's value relative to its current or target value over a specified time span.< / td >
< / tr >
< tr >
< td class = "name" > < a href = "#SetVisibility" > SetVisibility(visible)< / a > < / td >
< td class = "summary" > The function controls the visibility of a custom bar.< / td >
< / tr >
< tr >
< td class = "name" > < a href = "#IsVisible" > IsVisible()< / a > < / td >
< td class = "summary" > The function checks whether a custom bar is currently visible.< / td >
< / tr >
< tr >
< td class = "name" > < a href = "#GetValue" > GetValue()< / a > < / td >
< td class = "summary" > The function retrieves the current value of a custom bar.< / td >
< / tr >
< tr >
< td class = "name" > < a href = "#DeleteAllBars" > DeleteAllBars()< / a > < / td >
< td class = "summary" > The function deletes all custom bars.< / td >
< / tr >
< tr >
< td class = "name" > < a href = "#ShowEnemiesHpGenericBar" > ShowEnemiesHpGenericBar(value)< / a > < / td >
< td class = "summary" > This function prevents the creation of new health bars for enemies when set to false.< / td >
< / tr >
< tr >
< td class = "name" > < a href = "#DeleteExistingHpGenericBars" > DeleteExistingHpGenericBars()< / a > < / td >
< td class = "summary" > The function deletes all the enemy health bars excluding those created by CustomBar.CreateEnemyHpBar.< / td >
< / tr >
< tr >
< td class = "name" > < a href = "#SetBackgroundPosition" > SetBackgroundPosition(pos)< / a > < / td >
< td class = "summary" > Sets the custom bar background sprite position.< / td >
< / tr >
< tr >
< td class = "name" > < a href = "#SetBackgroundRotation" > SetBackgroundRotation(rot)< / a > < / td >
< td class = "summary" > Sets the custom bar background sprite rotation.< / td >
< / tr >
< tr >
< td class = "name" > < a href = "#SetBackgroundScale" > SetBackgroundScale(scale)< / a > < / td >
< td class = "summary" > Sets the custom bar background sprite scale.< / td >
< / tr >
< tr >
< td class = "name" > < a href = "#SetBackgroundSpriteSlot" > SetBackgroundSpriteSlot(slot, id)< / a > < / td >
< td class = "summary" > Sets the custom bar background sprite slot and sprite ID.< / td >
< / tr >
< tr >
< td class = "name" > < a href = "#SetBackgroundAlignMode" > SetBackgroundAlignMode(alignMode)< / a > < / td >
< td class = "summary" > Sets the custom bar background sprite align mode.< / td >
< / tr >
< tr >
< td class = "name" > < a href = "#SetBackgroundScaleMode" > SetBackgroundScaleMode(scaleMode)< / a > < / td >
< td class = "summary" > Sets the custom bar background sprite scale mode.< / td >
< / tr >
< tr >
< td class = "name" > < a href = "#SetBackgroundBlendMode" > SetBackgroundBlendMode(blendMode)< / a > < / td >
< td class = "summary" > Sets the custom bar background sprite blend mode.< / td >
< / tr >
< tr >
< td class = "name" > < a href = "#SetBarPosition" > SetBarPosition(pos)< / a > < / td >
< td class = "summary" > Sets the custom bar sprite position.< / td >
< / tr >
< tr >
< td class = "name" > < a href = "#SetBarRotation" > SetBarRotation(rot)< / a > < / td >
< td class = "summary" > Sets the custom bar sprite rotation.< / td >
< / tr >
< tr >
< td class = "name" > < a href = "#SetBarColor" > SetBarColor(color)< / a > < / td >
< td class = "summary" > Sets the custom bar sprite color.< / td >
< / tr >
< tr >
< td class = "name" > < a href = "#SetBarScale" > SetBarScale(scale)< / a > < / td >
< td class = "summary" > Sets the custom bar sprite scale.< / td >
< / tr >
< tr >
< td class = "name" > < a href = "#SetBarSpriteSlot" > SetBarSpriteSlot(slot, id)< / a > < / td >
< td class = "summary" > Sets the custom bar sprite slot and sprite ID.< / td >
< / tr >
< tr >
< td class = "name" > < a href = "#SetBarAlignMode" > SetBarAlignMode(alignMode)< / a > < / td >
< td class = "summary" > Sets the custom bar sprite alignment mode.< / td >
< / tr >
< tr >
< td class = "name" > < a href = "#SetBarScaleMode" > SetBarScaleMode(scaleMode)< / a > < / td >
< td class = "summary" > Sets the custom bar sprite scale mode.< / td >
< / tr >
< tr >
< td class = "name" > < a href = "#SetBarBlendMode" > SetBarBlendMode(blendMode)< / a > < / td >
< td class = "summary" > Sets the custom bar sprite blend mode.< / td >
< / tr >
< / table >
< h2 > < a href = "#Tables" > Tables< / a > < / h2 >
< table class = "function_list" >
< tr >
< td class = "name" > < a href = "#barData" > barData< / a > < / td >
< td class = "summary" > Table setup for creating custom bar.< / td >
< / tr >
< tr >
< td class = "name" > < a href = "#playerBarData" > playerBarData< / a > < / td >
< td class = "summary" > Table setup for creating custom player attribute bar.< / td >
< / tr >
< tr >
< td class = "name" > < a href = "#enemyBarData" > enemyBarData< / a > < / td >
< td class = "summary" > Table setup for creating a specific enemy health bar.< / td >
< / tr >
< tr >
< td class = "name" > < a href = "#enemiesBarData" > enemiesBarData< / a > < / td >
< td class = "summary" > Table setup for creating health bars for all enemies.< / td >
< / tr >
< / table >
< br / >
< br / >
< h2 class = "section-header " > < a name = "Functions" > < / a > Functions< / h2 >
< dl class = "function" >
< dt >
< a name = "Create" > < / a >
< strong > Create(barData)< / strong >
< / dt >
< dd >
Creates a custom progress bar with extensive configuration options.
< h3 > Parameters:< / h3 >
< ul >
< li > < span class = "parameter" > barData< / span >
< span class = "types" > < a class = "type" href = "https://www.lua.org/manual/5.4/manual.html#6.6" > table< / a > < / span >
The table that contains all the bar data. Refer to table setup for barData.
< / li >
< / ul >
< h3 > Returns:< / h3 >
< ol >
< span class = "types" > < a class = "type" href = "../5 lua utility modules/CustomBar.html#" > CustomBar< / a > < / span >
The custombar in its hidden state
< / ol >
< / dd >
< dt >
< a name = "CreatePlayerBar" > < / a >
< strong > CreatePlayerBar(playerBarData)< / strong >
< / dt >
< dd >
Creates a bar tied to Players's attributes (Health, Air, Stamina).
< h3 > Parameters:< / h3 >
< ul >
< li > < span class = "parameter" > playerBarData< / span >
< span class = "types" > < a class = "type" href = "https://www.lua.org/manual/5.4/manual.html#6.6" > table< / a > < / span >
The table that contains all the player bar data. Refer to table setup for playerBarData.
< / li >
< / ul >
< h3 > Returns:< / h3 >
< ol >
< span class = "types" > < a class = "type" href = "../5 lua utility modules/CustomBar.html#" > CustomBar< / a > < / span >
Player attribute bar.
< / ol >
< / dd >
< dt >
< a name = "CreateEnemyHpBar" > < / a >
< strong > CreateEnemyHpBar(enemyBarData)< / strong >
< / dt >
< dd >
Creates a custom health bar for a specific enemy (like a boss). Ensure this function is called before Lara aims at the enemy if using generic enemy HP bars as well.
Also be sure to call this function after increasing the HP of the enemy via LUA.
< h3 > Parameters:< / h3 >
< ul >
< li > < span class = "parameter" > enemyBarData< / span >
< span class = "types" > < a class = "type" href = "https://www.lua.org/manual/5.4/manual.html#6.6" > table< / a > < / span >
The table that contains all the enemy bar data. Refer to table setup for enemyBarData.
< / li >
< / ul >
< h3 > Returns:< / h3 >
< ol >
< span class = "types" > < a class = "type" href = "../5 lua utility modules/CustomBar.html#" > CustomBar< / a > < / span >
Enemy health bar.
< / ol >
< / dd >
< dt >
< a name = "SetEnemiesHpGenericBar" > < / a >
< strong > SetEnemiesHpGenericBar(enemiesBarData)< / strong >
< / dt >
< dd >
Creates health bars for all enemies. A new bar is generated whenever Lara targets an enemy. If the "hide text" option is disabled, the enemy's name (as set in the editor) is displayed.
Multiple enemies can share the same name by appending _number to the name in the editor. If adjusting an enemy's max HP, ensure this is done before Lara targets the enemy.
To create health bars for specific enemies, use CustomBar.CreateEnemyHpBar, ensuring the bar is created prior to targeting.
< h3 > Parameters:< / h3 >
< ul >
< li > < span class = "parameter" > enemiesBarData< / span >
< span class = "types" > < a class = "type" href = "https://www.lua.org/manual/5.4/manual.html#6.6" > table< / a > < / span >
The table that contains all the enemies bar data. Refer to table setup for enemiesBarData.
< / li >
< / ul >
< h3 > Returns:< / h3 >
< ol >
< span class = "types" > < a class = "type" href = "../5 lua utility modules/CustomBar.html#" > CustomBar< / a > < / span >
Enemy health bars.
< / ol >
< / dd >
< dt >
< a name = "Get" > < / a >
< strong > Get(barName)< / strong >
< / dt >
< dd >
The function retrieves an existing bar instance by its unique identifier (barName). This function is useful when you need to access or manipulate a bar that has already been created.
< h3 > Parameters:< / h3 >
< ul >
< li > < span class = "parameter" > barName< / span >
< span class = "types" > < a class = "type" href = "https://www.lua.org/manual/5.4/manual.html#6.4" > string< / a > < / span >
The unique identifier assigned to the bar when it was created using CustomBar.New
< / li >
< / ul >
< / dd >
< dt >
< a name = "Delete" > < / a >
< strong > Delete(barName)< / strong >
< / dt >
< dd >
The function removes a custom bar and its associated data from the system. It ensures that the bar is no longer tracked or accessible in the LevelVars.Engine.CustomBars.bars table.
< h3 > Parameters:< / h3 >
< ul >
< li > < span class = "parameter" > barName< / span >
< span class = "types" > < a class = "type" href = "https://www.lua.org/manual/5.4/manual.html#6.4" > string< / a > < / span >
The name of the custom bar to be deleted.
< / li >
< / ul >
< / dd >
< dt >
< a name = "SetBarValue" > < / a >
< strong > SetBarValue(value, time)< / strong >
< / dt >
< dd >
The function sets the value of a custom bar over a specified time period.
< h3 > Parameters:< / h3 >
< ul >
< li > < span class = "parameter" > value< / span >
< span class = "types" > < span class = "type" > number< / span > < / span >
The new target to which the bar's current value should transition. (Must be a non-negative number; between 0 and the bar's maxValue.
< / li >
< li > < span class = "parameter" > time< / span >
< span class = "types" > < span class = "type" > number< / span > < / span >
The time (in seconds) over which the bar's value should transition to the target value.
< / li >
< / ul >
< / dd >
< dt >
< a name = "ChangeBarValueOverTimespan" > < / a >
< strong > ChangeBarValueOverTimespan(value, time)< / strong >
< / dt >
< dd >
The function adjusts the bar's value relative to its current or target value over a specified time span.
< h3 > Parameters:< / h3 >
< ul >
< li > < span class = "parameter" > value< / span >
< span class = "types" > < span class = "type" > number< / span > < / span >
The relative value to add (positive or negative) to the current bar value.
< / li >
< li > < span class = "parameter" > time< / span >
< span class = "types" > < span class = "type" > number< / span > < / span >
The duration (in seconds) over which the change should occur.
< / li >
< / ul >
< / dd >
< dt >
< a name = "SetVisibility" > < / a >
< strong > SetVisibility(visible)< / strong >
< / dt >
< dd >
The function controls the visibility of a custom bar.
< h3 > Parameters:< / h3 >
< ul >
< li > < span class = "parameter" > visible< / span >
< span class = "types" > < span class = "type" > bool< / span > < / span >
true: Makes the bar visible.; false: Hides the bar.
< / li >
< / ul >
< / dd >
< dt >
< a name = "IsVisible" > < / a >
< strong > IsVisible()< / strong >
< / dt >
< dd >
The function checks whether a custom bar is currently visible.
< h3 > Returns:< / h3 >
< ol >
< span class = "types" > < span class = "type" > bool< / span > < / span >
true if the bar is visible and false if it is not.
< / ol >
< / dd >
< dt >
< a name = "GetValue" > < / a >
< strong > GetValue()< / strong >
< / dt >
< dd >
The function retrieves the current value of a custom bar.
< h3 > Returns:< / h3 >
< ol >
< span class = "types" > < span class = "type" > float< / span > < / span >
returns the current value of a custom bar.
< / ol >
< / dd >
< dt >
< a name = "DeleteAllBars" > < / a >
< strong > DeleteAllBars()< / strong >
< / dt >
< dd >
The function deletes all custom bars.
< / dd >
< dt >
< a name = "ShowEnemiesHpGenericBar" > < / a >
< strong > ShowEnemiesHpGenericBar(value)< / strong >
< / dt >
< dd >
This function prevents the creation of new health bars for enemies when set to false. However, it does not affect the health bars that have already been created.
< h3 > Parameters:< / h3 >
< ul >
< li > < span class = "parameter" > value< / span >
< span class = "types" > < span class = "type" > bool< / span > < / span >
Specifies whether new health bars for enemies should be created.
< / li >
< / ul >
< / dd >
< dt >
< a name = "DeleteExistingHpGenericBars" > < / a >
< strong > DeleteExistingHpGenericBars()< / strong >
< / dt >
< dd >
The function deletes all the enemy health bars excluding those created by CustomBar.CreateEnemyHpBar.
< / dd >
< dt >
< a name = "SetBackgroundPosition" > < / a >
< strong > SetBackgroundPosition(pos)< / strong >
< / dt >
< dd >
Sets the custom bar background sprite position.
< h3 > Parameters:< / h3 >
< ul >
< li > < span class = "parameter" > pos< / span >
< span class = "types" > < a class = "type" href = "../3 primitive classes/Vec2.html#" > Vec2< / a > < / span >
X,Y position of the bar's background in screen percent (0-100).
< / li >
< / ul >
< / dd >
< dt >
< a name = "SetBackgroundRotation" > < / a >
< strong > SetBackgroundRotation(rot)< / strong >
< / dt >
< dd >
Sets the custom bar background sprite rotation.
< h3 > Parameters:< / h3 >
< ul >
< li > < span class = "parameter" > rot< / span >
< span class = "types" > < span class = "type" > number< / span > < / span >
rotation of the bar's background. sprite (0-360).
< / li >
< / ul >
< / dd >
< dt >
< a name = "SetBackgroundScale" > < / a >
< strong > SetBackgroundScale(scale)< / strong >
< / dt >
< dd >
Sets the custom bar background sprite scale.
< h3 > Parameters:< / h3 >
< ul >
< li > < span class = "parameter" > scale< / span >
< span class = "types" > < a class = "type" href = "../3 primitive classes/Vec2.html#" > Vec2< / a > < / span >
X,Y Scaling factor for the bar's background sprite.
< / li >
< / ul >
< / dd >
< dt >
< a name = "SetBackgroundSpriteSlot" > < / a >
< strong > SetBackgroundSpriteSlot(slot, id)< / strong >
< / dt >
< dd >
Sets the custom bar background sprite slot and sprite ID.
< h3 > Parameters:< / h3 >
< ul >
< li > < span class = "parameter" > slot< / span >
< span class = "types" > < a class = "type" href = "../4 enums/Objects.ObjID.html#" > ObjID< / a > < / span >
Object ID for the bar's background sprite.
< / li >
< li > < span class = "parameter" > id< / span >
< span class = "types" > < span class = "type" > number< / span > < / span >
SpriteID from the specified object for the bar's background.
< / li >
< / ul >
< / dd >
< dt >
< a name = "SetBackgroundAlignMode" > < / a >
< strong > SetBackgroundAlignMode(alignMode)< / strong >
< / dt >
< dd >
Sets the custom bar background sprite align mode.
< h3 > Parameters:< / h3 >
< ul >
< li > < span class = "parameter" > alignMode< / span >
< span class = "types" > < a class = "type" href = "../4 enums/View.AlignMode.html#" > AlignMode< / a > < / span >
Alignment for the bar's background.
< / li >
< / ul >
< / dd >
< dt >
< a name = "SetBackgroundScaleMode" > < / a >
< strong > SetBackgroundScaleMode(scaleMode)< / strong >
< / dt >
< dd >
Sets the custom bar background sprite scale mode.
< h3 > Parameters:< / h3 >
< ul >
< li > < span class = "parameter" > scaleMode< / span >
< span class = "types" > < a class = "type" href = "../4 enums/View.ScaleMode.html#" > ScaleMode< / a > < / span >
Scaling for the bar's background.
< / li >
< / ul >
< / dd >
< dt >
< a name = "SetBackgroundBlendMode" > < / a >
< strong > SetBackgroundBlendMode(blendMode)< / strong >
< / dt >
< dd >
Sets the custom bar background sprite blend mode.
< h3 > Parameters:< / h3 >
< ul >
< li > < span class = "parameter" > blendMode< / span >
< span class = "types" > < a class = "type" href = "../4 enums/Effects.BlendID.html#" > BlendID< / a > < / span >
Blending modes for the bar's background.
< / li >
< / ul >
< / dd >
< dt >
< a name = "SetBarPosition" > < / a >
< strong > SetBarPosition(pos)< / strong >
< / dt >
< dd >
Sets the custom bar sprite position.
< h3 > Parameters:< / h3 >
< ul >
< li > < span class = "parameter" > pos< / span >
< span class = "types" > < a class = "type" href = "../3 primitive classes/Vec2.html#" > Vec2< / a > < / span >
X,Y position of the bar in screen percent (0-100).
< / li >
< / ul >
< / dd >
< dt >
< a name = "SetBarRotation" > < / a >
< strong > SetBarRotation(rot)< / strong >
< / dt >
< dd >
Sets the custom bar sprite rotation.
< h3 > Parameters:< / h3 >
< ul >
< li > < span class = "parameter" > rot< / span >
< span class = "types" > < span class = "type" > number< / span > < / span >
rotation of the bar's sprite (0-360).
< / li >
< / ul >
< / dd >
< dt >
< a name = "SetBarColor" > < / a >
< strong > SetBarColor(color)< / strong >
< / dt >
< dd >
Sets the custom bar sprite color.
< h3 > Parameters:< / h3 >
< ul >
< li > < span class = "parameter" > color< / span >
< span class = "types" > < a class = "type" href = "../3 primitive classes/Color.html#" > Color< / a > < / span >
Color of the bar.
< / li >
< / ul >
< / dd >
< dt >
< a name = "SetBarScale" > < / a >
< strong > SetBarScale(scale)< / strong >
< / dt >
< dd >
Sets the custom bar sprite scale.
< h3 > Parameters:< / h3 >
< ul >
< li > < span class = "parameter" > scale< / span >
< span class = "types" > < a class = "type" href = "../3 primitive classes/Vec2.html#" > Vec2< / a > < / span >
X,Y Scaling factor for the bar's sprite.
< / li >
< / ul >
< / dd >
< dt >
< a name = "SetBarSpriteSlot" > < / a >
< strong > SetBarSpriteSlot(slot, id)< / strong >
< / dt >
< dd >
Sets the custom bar sprite slot and sprite ID.
< h3 > Parameters:< / h3 >
< ul >
< li > < span class = "parameter" > slot< / span >
< span class = "types" > < a class = "type" href = "../4 enums/Objects.ObjID.html#" > ObjID< / a > < / span >
Object ID for the bar sprite.
< / li >
< li > < span class = "parameter" > id< / span >
< span class = "types" > < span class = "type" > number< / span > < / span >
SpriteID from the specified object for the bar.
< / li >
< / ul >
< / dd >
< dt >
< a name = "SetBarAlignMode" > < / a >
< strong > SetBarAlignMode(alignMode)< / strong >
< / dt >
< dd >
Sets the custom bar sprite alignment mode.
< h3 > Parameters:< / h3 >
< ul >
< li > < span class = "parameter" > alignMode< / span >
< span class = "types" > < a class = "type" href = "../4 enums/View.AlignMode.html#" > AlignMode< / a > < / span >
Alignment for the bar.
< / li >
< / ul >
< / dd >
< dt >
< a name = "SetBarScaleMode" > < / a >
< strong > SetBarScaleMode(scaleMode)< / strong >
< / dt >
< dd >
Sets the custom bar sprite scale mode.
< h3 > Parameters:< / h3 >
< ul >
< li > < span class = "parameter" > scaleMode< / span >
< span class = "types" > < a class = "type" href = "../4 enums/View.ScaleMode.html#" > ScaleMode< / a > < / span >
Scaling for the bar.
< / li >
< / ul >
< / dd >
< dt >
< a name = "SetBarBlendMode" > < / a >
< strong > SetBarBlendMode(blendMode)< / strong >
< / dt >
< dd >
Sets the custom bar sprite blend mode.
< h3 > Parameters:< / h3 >
< ul >
< li > < span class = "parameter" > blendMode< / span >
< span class = "types" > < a class = "type" href = "../4 enums/Effects.BlendID.html#" > BlendID< / a > < / span >
Blending modes for the bar.
< / li >
< / ul >
< / dd >
< / dl >
< h2 class = "section-header " > < a name = "Tables" > < / a > Tables< / h2 >
< dl class = "function" >
< dt >
< a name = "barData" > < / a >
< strong > barData< / strong >
< / dt >
< dd >
Table setup for creating custom bar.
< h3 > Fields:< / h3 >
< ul >
< li > < span class = "parameter" > barName< / span >
< span class = "types" > < a class = "type" href = "https://www.lua.org/manual/5.4/manual.html#6.4" > string< / a > < / span >
Unique identifier for the bar.
< / li >
< li > < span class = "parameter" > startValue< / span >
< span class = "types" > < span class = "type" > float< / span > < / span >
Initial value of the bar.
< / li >
< li > < span class = "parameter" > maxValue< / span >
< span class = "types" > < span class = "type" > float< / span > < / span >
Maximum value of the bar.
< / li >
< li > < span class = "parameter" > objectIdBg< / span >
< span class = "types" > < a class = "type" href = "../4 enums/Objects.ObjID.html#" > ObjID< / a > < / span >
Object ID for the bar's background sprite.
< / li >
< li > < span class = "parameter" > spriteIdBg< / span >
< span class = "types" > < span class = "type" > number< / span > < / span >
SpriteID from the specified object for the bar's background.
< / li >
< li > < span class = "parameter" > colorBg< / span >
< span class = "types" > < a class = "type" href = "../3 primitive classes/Color.html#" > Color< / a > < / span >
Color of bar's background.
< / li >
< li > < span class = "parameter" > posBg< / span >
< span class = "types" > < a class = "type" href = "../3 primitive classes/Vec2.html#" > Vec2< / a > < / span >
X,Y position of the bar's background in screen percent (0-100).
< / li >
< li > < span class = "parameter" > rotBg< / span >
< span class = "types" > < span class = "type" > float< / span > < / span >
rotation of the bar's background. sprite (0-360).
< / li >
< li > < span class = "parameter" > scaleBg< / span >
< span class = "types" > < a class = "type" href = "../3 primitive classes/Vec2.html#" > Vec2< / a > < / span >
X,Y Scaling factor for the bar's background sprite.
< / li >
< li > < span class = "parameter" > alignModeBg< / span >
< span class = "types" > < a class = "type" href = "../4 enums/View.AlignMode.html#" > AlignMode< / a > < / span >
Alignment for the bar's background.
< / li >
< li > < span class = "parameter" > scaleModeBg< / span >
< span class = "types" > < a class = "type" href = "../4 enums/View.ScaleMode.html#" > ScaleMode< / a > < / span >
Scaling for the bar's background.
< / li >
< li > < span class = "parameter" > blendModeBg< / span >
< span class = "types" > < a class = "type" href = "../4 enums/Effects.BlendID.html#" > BlendID< / a > < / span >
Blending modes for the bar's background.
< / li >
< li > < span class = "parameter" > objectIdBar< / span >
< span class = "types" > < a class = "type" href = "../4 enums/Objects.ObjID.html#" > ObjID< / a > < / span >
Object ID for the bar sprite.
< / li >
< li > < span class = "parameter" > spriteIdBar< / span >
< span class = "types" > < span class = "type" > number< / span > < / span >
SpriteID from the specified object for the bar.
< / li >
< li > < span class = "parameter" > colorBar< / span >
< span class = "types" > < a class = "type" href = "../3 primitive classes/Color.html#" > Color< / a > < / span >
Color of the bar.
< / li >
< li > < span class = "parameter" > posBar< / span >
< span class = "types" > < a class = "type" href = "../3 primitive classes/Vec2.html#" > Vec2< / a > < / span >
X,Y position of the bar in screen percent (0-100).
< / li >
< li > < span class = "parameter" > rot< / span >
< span class = "types" > < span class = "type" > float< / span > < / span >
rotation of the bar's sprite (0-360).
< / li >
< li > < span class = "parameter" > scaleBar< / span >
< span class = "types" > < a class = "type" href = "../3 primitive classes/Vec2.html#" > Vec2< / a > < / span >
X,Y Scaling factor for the bar's sprite.
< / li >
< li > < span class = "parameter" > alignMode< / span >
< span class = "types" > < a class = "type" href = "../4 enums/View.AlignMode.html#" > AlignMode< / a > < / span >
Alignment for the bar.
< / li >
< li > < span class = "parameter" > scaleMode< / span >
< span class = "types" > < a class = "type" href = "../4 enums/View.ScaleMode.html#" > ScaleMode< / a > < / span >
Scaling for the bar.
< / li >
< li > < span class = "parameter" > blendMode< / span >
< span class = "types" > < a class = "type" href = "../4 enums/Effects.BlendID.html#" > BlendID< / a > < / span >
Blending modes for the bar.
< / li >
< li > < span class = "parameter" > text< / span >
< span class = "types" > < a class = "type" href = "https://www.lua.org/manual/5.4/manual.html#6.4" > string< / a > < / span >
Text to display on the bar.
< / li >
< li > < span class = "parameter" > textPos< / span >
< span class = "types" > < a class = "type" href = "../3 primitive classes/Vec2.html#" > Vec2< / a > < / span >
X,Y position of the text.
< / li >
< li > < span class = "parameter" > textOptions< / span >
< span class = "types" > < a class = "type" href = "../4 enums/Strings.DisplayStringOption.html#" > DisplayStringOption< / a > < / span >
alignment and effects for the text. Default: None. Please note text is automatically aligned to the LEFT
< / li >
< li > < span class = "parameter" > textScale< / span >
< span class = "types" > < span class = "type" > number< / span > < / span >
Scale factor for the text.
< / li >
< li > < span class = "parameter" > textColor< / span >
< span class = "types" > < a class = "type" href = "../3 primitive classes/Color.html#" > Color< / a > < / span >
Color of the text.
< / li >
< li > < span class = "parameter" > hideText< / span >
< span class = "types" > < span class = "type" > bool< / span > < / span >
Whether to hide the text.
< / li >
< li > < span class = "parameter" > alphaBlendSpeed< / span >
< span class = "types" > < span class = "type" > number< / span > < / span >
Speed of alpha blending for bar visibility (0-255).
< / li >
< li > < span class = "parameter" > blink< / span >
< span class = "types" > < span class = "type" > bool< / span > < / span >
Whether the bar blinks.
< / li >
< li > < span class = "parameter" > blinkLimit< / span >
< span class = "types" > < span class = "type" > number< / span > < / span >
% Limit below which bar starts blinking (0-1).
< / li >
< / ul >
< / dd >
< dt >
< a name = "playerBarData" > < / a >
< strong > playerBarData< / strong >
< / dt >
< dd >
Table setup for creating custom player attribute bar.
< h3 > Fields:< / h3 >
< ul >
< li > < span class = "parameter" > getActionType< / span >
< span class = "types" > < span class = "type" > number< / span > < / span >
Determines the bar type: 1: Health, 2: Air, 3: Stamina.
< / li >
< li > < span class = "parameter" > objectIdBg< / span >
< span class = "types" > < a class = "type" href = "../4 enums/Objects.ObjID.html#" > ObjID< / a > < / span >
Object ID for the bar's background sprite.
< / li >
< li > < span class = "parameter" > spriteIdBg< / span >
< span class = "types" > < span class = "type" > number< / span > < / span >
SpriteID from the specified object for the bar's background.
< / li >
< li > < span class = "parameter" > colorBg< / span >
< span class = "types" > < a class = "type" href = "../3 primitive classes/Color.html#" > Color< / a > < / span >
Color of bar's background.
< / li >
< li > < span class = "parameter" > posBg< / span >
< span class = "types" > < a class = "type" href = "../3 primitive classes/Vec2.html#" > Vec2< / a > < / span >
X,Y position of the bar's background in screen percent (0-100).
< / li >
< li > < span class = "parameter" > rotBg< / span >
< span class = "types" > < span class = "type" > number< / span > < / span >
rotation of the bar's background. sprite (0-360).
< / li >
< li > < span class = "parameter" > scaleBg< / span >
< span class = "types" > < a class = "type" href = "../3 primitive classes/Vec2.html#" > Vec2< / a > < / span >
X,Y Scaling factor for the bar's background sprite.
< / li >
< li > < span class = "parameter" > alignModeBg< / span >
< span class = "types" > < a class = "type" href = "../4 enums/View.AlignMode.html#" > AlignMode< / a > < / span >
Alignment for the bar's background.
< / li >
< li > < span class = "parameter" > scaleModeBg< / span >
< span class = "types" > < a class = "type" href = "../4 enums/View.ScaleMode.html#" > ScaleMode< / a > < / span >
Scaling for the bar's background.
< / li >
< li > < span class = "parameter" > blendModeBg< / span >
< span class = "types" > < a class = "type" href = "../4 enums/Effects.BlendID.html#" > BlendID< / a > < / span >
Blending modes for the bar's background.
< / li >
< li > < span class = "parameter" > objectIdBar< / span >
< span class = "types" > < a class = "type" href = "../4 enums/Objects.ObjID.html#" > ObjID< / a > < / span >
Object ID for the bar sprite.
< / li >
< li > < span class = "parameter" > spriteIdBar< / span >
< span class = "types" > < span class = "type" > number< / span > < / span >
SpriteID from the specified object for the bar.
< / li >
< li > < span class = "parameter" > colorBar< / span >
< span class = "types" > < a class = "type" href = "../3 primitive classes/Color.html#" > Color< / a > < / span >
Color of the bar.
< / li >
< li > < span class = "parameter" > posBar< / span >
< span class = "types" > < a class = "type" href = "../3 primitive classes/Vec2.html#" > Vec2< / a > < / span >
X,Y position of the bar in screen percent (0-100).
< / li >
< li > < span class = "parameter" > rot< / span >
< span class = "types" > < span class = "type" > number< / span > < / span >
rotation of the bar's sprite (0-360).
< / li >
< li > < span class = "parameter" > scaleBar< / span >
< span class = "types" > < a class = "type" href = "../3 primitive classes/Vec2.html#" > Vec2< / a > < / span >
X,Y Scaling factor for the bar's sprite.
< / li >
< li > < span class = "parameter" > alignMode< / span >
< span class = "types" > < a class = "type" href = "../4 enums/View.AlignMode.html#" > AlignMode< / a > < / span >
Alignment for the bar.
< / li >
< li > < span class = "parameter" > scaleMode< / span >
< span class = "types" > < a class = "type" href = "../4 enums/View.ScaleMode.html#" > ScaleMode< / a > < / span >
Scaling for the bar.
< / li >
< li > < span class = "parameter" > blendMode< / span >
< span class = "types" > < a class = "type" href = "../4 enums/Effects.BlendID.html#" > BlendID< / a > < / span >
Blending modes for the bar.
< / li >
< li > < span class = "parameter" > alphaBlendSpeed< / span >
< span class = "types" > < span class = "type" > number< / span > < / span >
Speed of alpha blending for bar visibility (0-255).
< / li >
< li > < span class = "parameter" > showBar< / span >
< span class = "types" > < span class = "type" > bool< / span > < / span >
Option to always show the bar. If set to false, the bars will automatically hide when they stop updating.
< / li >
< li > < span class = "parameter" > blink< / span >
< span class = "types" > < span class = "type" > bool< / span > < / span >
Whether the bar blinks.
< / li >
< li > < span class = "parameter" > blinkLimit< / span >
< span class = "types" > < span class = "type" > number< / span > < / span >
% Limit below which bar starts blinking (0-1).
< / li >
< / ul >
< / dd >
< dt >
< a name = "enemyBarData" > < / a >
< strong > enemyBarData< / strong >
< / dt >
< dd >
Table setup for creating a specific enemy health bar.
< h3 > Fields:< / h3 >
< ul >
< li > < span class = "parameter" > barName< / span >
< span class = "types" > < a class = "type" href = "https://www.lua.org/manual/5.4/manual.html#6.4" > string< / a > < / span >
Unique identifier for the bar.
< / li >
< li > < span class = "parameter" > objectIdBg< / span >
< span class = "types" > < a class = "type" href = "../4 enums/Objects.ObjID.html#" > ObjID< / a > < / span >
Object ID for the bar's background sprite.
< / li >
< li > < span class = "parameter" > spriteIdBg< / span >
< span class = "types" > < span class = "type" > number< / span > < / span >
SpriteID from the specified object for the bar's background.
< / li >
< li > < span class = "parameter" > colorBg< / span >
< span class = "types" > < a class = "type" href = "../3 primitive classes/Color.html#" > Color< / a > < / span >
Color of bar's background.
< / li >
< li > < span class = "parameter" > posBg< / span >
< span class = "types" > < a class = "type" href = "../3 primitive classes/Vec2.html#" > Vec2< / a > < / span >
X,Y position of the bar's background in screen percent (0-100).
< / li >
< li > < span class = "parameter" > rotBg< / span >
< span class = "types" > < span class = "type" > number< / span > < / span >
rotation of the bar's background. sprite (0-360).
< / li >
< li > < span class = "parameter" > scaleBg< / span >
< span class = "types" > < a class = "type" href = "../3 primitive classes/Vec2.html#" > Vec2< / a > < / span >
X,Y Scaling factor for the bar's background sprite.
< / li >
< li > < span class = "parameter" > alignModeBg< / span >
< span class = "types" > < a class = "type" href = "../4 enums/View.AlignMode.html#" > AlignMode< / a > < / span >
Alignment for the bar's background.
< / li >
< li > < span class = "parameter" > scaleModeBg< / span >
< span class = "types" > < a class = "type" href = "../4 enums/View.ScaleMode.html#" > ScaleMode< / a > < / span >
Scaling for the bar's background.
< / li >
< li > < span class = "parameter" > blendModeBg< / span >
< span class = "types" > < a class = "type" href = "../4 enums/Effects.BlendID.html#" > BlendID< / a > < / span >
Blending modes for the bar's background.
< / li >
< li > < span class = "parameter" > objectIdBar< / span >
< span class = "types" > < a class = "type" href = "../4 enums/Objects.ObjID.html#" > ObjID< / a > < / span >
Object ID for the bar sprite.
< / li >
< li > < span class = "parameter" > spriteIdBar< / span >
< span class = "types" > < span class = "type" > number< / span > < / span >
SpriteID from the specified object for the bar.
< / li >
< li > < span class = "parameter" > colorBar< / span >
< span class = "types" > < a class = "type" href = "../3 primitive classes/Color.html#" > Color< / a > < / span >
Color of the bar.
< / li >
< li > < span class = "parameter" > posBar< / span >
< span class = "types" > < a class = "type" href = "../3 primitive classes/Vec2.html#" > Vec2< / a > < / span >
X,Y position of the bar in screen percent (0-100).
< / li >
< li > < span class = "parameter" > rot< / span >
< span class = "types" > < span class = "type" > number< / span > < / span >
rotation of the bar's sprite (0-360).
< / li >
< li > < span class = "parameter" > scaleBar< / span >
< span class = "types" > < a class = "type" href = "../3 primitive classes/Vec2.html#" > Vec2< / a > < / span >
X,Y Scaling factor for the bar's sprite.
< / li >
< li > < span class = "parameter" > alignMode< / span >
< span class = "types" > < a class = "type" href = "../4 enums/View.AlignMode.html#" > AlignMode< / a > < / span >
Alignment for the bar.
< / li >
< li > < span class = "parameter" > scaleMode< / span >
< span class = "types" > < a class = "type" href = "../4 enums/View.ScaleMode.html#" > ScaleMode< / a > < / span >
Scaling for the bar.
< / li >
< li > < span class = "parameter" > blendMode< / span >
< span class = "types" > < a class = "type" href = "../4 enums/Effects.BlendID.html#" > BlendID< / a > < / span >
Blending modes for the bar.
< / li >
< li > < span class = "parameter" > text< / span >
< span class = "types" > < a class = "type" href = "https://www.lua.org/manual/5.4/manual.html#6.4" > string< / a > < / span >
Text to display for the enemy.
< / li >
< li > < span class = "parameter" > textPos< / span >
< span class = "types" > < a class = "type" href = "../3 primitive classes/Vec2.html#" > Vec2< / a > < / span >
X,Y position of the text.
< / li >
< li > < span class = "parameter" > textOptions< / span >
< span class = "types" > < a class = "type" href = "../4 enums/Strings.DisplayStringOption.html#" > DisplayStringOption< / a > < / span >
alignment and effects for the text. Default: None. Please note text is automatically aligned to the LEFT
< / li >
< li > < span class = "parameter" > textScale< / span >
< span class = "types" > < span class = "type" > number< / span > < / span >
Scale factor for the text.
< / li >
< li > < span class = "parameter" > textColor< / span >
< span class = "types" > < a class = "type" href = "../3 primitive classes/Color.html#" > Color< / a > < / span >
Color of the text.
< / li >
< li > < span class = "parameter" > hideText< / span >
< span class = "types" > < span class = "type" > bool< / span > < / span >
Whether to hide the text.
< / li >
< li > < span class = "parameter" > alphaBlendSpeed< / span >
< span class = "types" > < span class = "type" > number< / span > < / span >
Speed of alpha blending for bar visibility (0-255).
< / li >
< li > < span class = "parameter" > object< / span >
< span class = "types" > < a class = "type" href = "https://www.lua.org/manual/5.4/manual.html#6.4" > string< / a > < / span >
Enemy name set in Editor for which to create HP for.
< / li >
< li > < span class = "parameter" > showBar< / span >
< span class = "types" > < span class = "type" > bool< / span > < / span >
Option to always show the bar whether the enemy is current target or not. Useful for boss health bars.
< / li >
< li > < span class = "parameter" > blink< / span >
< span class = "types" > < span class = "type" > bool< / span > < / span >
Whether the bar blinks.
< / li >
< li > < span class = "parameter" > blinkLimit< / span >
< span class = "types" > < span class = "type" > number< / span > < / span >
%Limit below which bar starts blinking (0-1).
< / li >
< / ul >
< / dd >
< dt >
< a name = "enemiesBarData" > < / a >
< strong > enemiesBarData< / strong >
< / dt >
< dd >
Table setup for creating health bars for all enemies.
< h3 > Fields:< / h3 >
< ul >
< li > < span class = "parameter" > objectIdBg< / span >
< span class = "types" > < a class = "type" href = "../4 enums/Objects.ObjID.html#" > ObjID< / a > < / span >
Object ID for the bar's background sprite.
< / li >
< li > < span class = "parameter" > spriteIdBg< / span >
< span class = "types" > < span class = "type" > number< / span > < / span >
SpriteID from the specified object for the bar's background.
< / li >
< li > < span class = "parameter" > colorBg< / span >
< span class = "types" > < a class = "type" href = "../3 primitive classes/Color.html#" > Color< / a > < / span >
Color of bar's background.
< / li >
< li > < span class = "parameter" > posBg< / span >
< span class = "types" > < a class = "type" href = "../3 primitive classes/Vec2.html#" > Vec2< / a > < / span >
X,Y position of the bar's background in screen percent (0-100).
< / li >
< li > < span class = "parameter" > rotBg< / span >
< span class = "types" > < span class = "type" > number< / span > < / span >
rotation of the bar's background. sprite (0-360).
< / li >
< li > < span class = "parameter" > scaleBg< / span >
< span class = "types" > < a class = "type" href = "../3 primitive classes/Vec2.html#" > Vec2< / a > < / span >
X,Y Scaling factor for the bar's background sprite.
< / li >
< li > < span class = "parameter" > alignModeBg< / span >
< span class = "types" > < a class = "type" href = "../4 enums/View.AlignMode.html#" > AlignMode< / a > < / span >
Alignment for the bar's background.
< / li >
< li > < span class = "parameter" > scaleModeBg< / span >
< span class = "types" > < a class = "type" href = "../4 enums/View.ScaleMode.html#" > ScaleMode< / a > < / span >
Scaling for the bar's background.
< / li >
< li > < span class = "parameter" > blendModeBg< / span >
< span class = "types" > < a class = "type" href = "../4 enums/Effects.BlendID.html#" > BlendID< / a > < / span >
Blending modes for the bar's background.
< / li >
< li > < span class = "parameter" > objectIdBar< / span >
< span class = "types" > < a class = "type" href = "../4 enums/Objects.ObjID.html#" > ObjID< / a > < / span >
Object ID for the bar sprite.
< / li >
< li > < span class = "parameter" > spriteIdBar< / span >
< span class = "types" > < span class = "type" > number< / span > < / span >
SpriteID from the specified object for the bar.
< / li >
< li > < span class = "parameter" > colorBar< / span >
< span class = "types" > < a class = "type" href = "../3 primitive classes/Color.html#" > Color< / a > < / span >
Color of the bar.
< / li >
< li > < span class = "parameter" > posBar< / span >
< span class = "types" > < a class = "type" href = "../3 primitive classes/Vec2.html#" > Vec2< / a > < / span >
X,Y position of the bar in screen percent (0-100).
< / li >
< li > < span class = "parameter" > rot< / span >
< span class = "types" > < span class = "type" > number< / span > < / span >
rotation of the bar's sprite (0-360).
< / li >
< li > < span class = "parameter" > scaleBar< / span >
< span class = "types" > < a class = "type" href = "../3 primitive classes/Vec2.html#" > Vec2< / a > < / span >
X,Y Scaling factor for the bar's sprite.
< / li >
< li > < span class = "parameter" > alignMode< / span >
< span class = "types" > < a class = "type" href = "../4 enums/View.AlignMode.html#" > AlignMode< / a > < / span >
Alignment for the bar.
< / li >
< li > < span class = "parameter" > scaleMode< / span >
< span class = "types" > < a class = "type" href = "../4 enums/View.ScaleMode.html#" > ScaleMode< / a > < / span >
Scaling for the bar.
< / li >
< li > < span class = "parameter" > blendMode< / span >
< span class = "types" > < a class = "type" href = "../4 enums/Effects.BlendID.html#" > BlendID< / a > < / span >
Blending modes for the bar.
< / li >
< li > < span class = "parameter" > textPos< / span >
< span class = "types" > < span class = "type" > number< / span > < / span >
X position of the text.
< / li >
< li > < span class = "parameter" > textOptions< / span >
< span class = "types" > < a class = "type" href = "../4 enums/Strings.DisplayStringOption.html#" > DisplayStringOption< / a > < / span >
alignment and effects for the text. Default: None. Please note text is automatically aligned to the LEFT
< / li >
< li > < span class = "parameter" > textScale< / span >
< span class = "types" > < span class = "type" > number< / span > < / span >
Scale factor for the text.
< / li >
< li > < span class = "parameter" > textColor< / span >
< span class = "types" > < a class = "type" href = "../3 primitive classes/Color.html#" > Color< / a > < / span >
Color of the text.
< / li >
< li > < span class = "parameter" > hideText< / span >
< span class = "types" > < span class = "type" > bool< / span > < / span >
Whether to hide the enemy name text.
< / li >
< li > < span class = "parameter" > alphaBlendSpeed< / span >
< span class = "types" > < span class = "type" > number< / span > < / span >
Speed of alpha blending for bar visibility (0-255).
< / li >
< li > < span class = "parameter" > blink< / span >
< span class = "types" > < span class = "type" > bool< / span > < / span >
Whether the bar blinks.
< / li >
< li > < span class = "parameter" > blinkLimit< / span >
< span class = "types" > < span class = "type" > number< / span > < / span >
%Limit below which bar starts blinking (0-1).
< / li >
< / ul >
< / dd >
< / dl >
< / div > <!-- id="content" -->
< / div > <!-- id="main" -->
< div id = "about" >
< i > generated by < a href = "https://github.com/hispidence/TEN-LDoc" > TEN-LDoc< / a > (a fork of < a href = "http://github.com/stevedonovan/LDoc" > LDoc 1.4.6< / a > )< / i >
< / div > <!-- id="about" -->
< / div > <!-- id="container" -->
< / body >
< / html >