Class VitalsBox
Gauges that sit at the bottom and do gauge things.
Initialisation
For creating and Initialising ShipCompass object.
-
VitalsBox:new (_name, _elementX, _elementY)
line 23
-
Creates a new instance of the VitalsBox class.
Parameters:
- _name
string
Instance name, should be identical to variable instance is assigned to.
- _elementX
number
X coordinate of VitalsBox, in screen coordinates.
- _elementY
number
Y coordinate of VitalsBox, in screen coordinates.
Returns:
table
A new instance of the VitalsBox class.
Usage:
vitals = VitalsBox:new("vitals",89,916)
Misc methods
-
VitalsBox:showTargetHP (_show)
line 327
-
Shows or hides target information.
Parameters:
- _show
bool
True to show self._targetHP, false to hide.
Usage:
vitals:showTarget(true)
-
VitalsBox:setVisible (_visible)
line 340
-
Shows or hides the whole object on the screen.
Just a shortcut for things like getting into my ship UI.
Parameters:
- _visible
bool
True to show object, false to hide.
Usage:
vitals:showTarget(true)
-
VitalsBox:update ()
line 350
-
It updates things.
Gauge methods
-
VitalsBox:setEndurance (_currentEnd, _maxEnd)
line 150
-
Sets endurance gauge and text.
Parameters:
- _currentEnd
int
Current endurance
- _maxEnd
int
Maximum endurance
-
VitalsBox:setHealth (_currentHP, _maxHP)
line 161
-
Sets HP gauge and text.
Parameters:
Usage:
vitals:setHealth(3723, 5200)
-
VitalsBox:setMana (_currentMP, _maxMP)
line 172
-
Sets MP gauge and text.
Parameters:
Usage:
vitals:setMana(4158, 4700)
-
VitalsBox:setTargetHealth (_value)
line 182
-
Sets target HP gauge and readout.
Parameters:
- _value
int
Target HP (percent)
Usage:
vitals:setTargetHealth(57)
-
VitalsBox:setWillpower (_currentWP, _maxWP)
line 192
-
Sets willpower gauge and text.
Parameters:
- _currentWP
int
Current willpower
- _maxWP
int
Maximum willpower
Label methods
-
VitalsBox:setBalance (_labelBalance)
line 211
-
Sets balance indicator.
Parameters:
- _labelBalance
Boolean
True if on balance.
Usage:
vitals:setBalance(true)
-
VitalsBox:setEquilibrium (_labelBalance)
line 231
-
Sets equilibrium indicator.
Parameters:
- _labelBalance
boolean
True if on balance.
Usage:
vitals:setEquilibrium(true)
-
VitalsBox:setLowHP (_value)
line 251
-
Sets low HP warning indicator.
Parameters:
- _value
boolean
True, to enable low HP warnings.
Usage:
vitals:setLowHP(true)
-
VitalsBox:setTargetName (_name)
line 294
-
Sets target name to be displayed.
Parameters:
Usage:
vitals:setTargetName("orc48192")
Battlerage
-
VitalsBox:setRage (_currentRage)
line 310
-
Sets rage text.
Parameters:
- _currentRage
int
Current rage
! And it doesn't work