API GetActiveShipHealth: Difference between revisions
From Vendetta Lua
Jump to navigationJump to search
split |
Chocolateer (talk | contribs) returns include current value of shields and shields max |
||
Line 1: | Line 1: | ||
=== GetActiveShipHealth === | === GetActiveShipHealth === | ||
'''Definition:'''<br> | '''Definition:'''<br> | ||
GetActiveShipHealth() -> int d1 d2 d3 d4 d5 d6 dmg max | GetActiveShipHealth() -> int d1 d2 d3 d4 d5 d6 dmg max shields shields_max | ||
<br> | <br> | ||
'''Description:'''<br> | '''Description:'''<br> | ||
Line 9: | Line 9: | ||
''d?'' damage to subsection 0 = no damage<br> | ''d?'' damage to subsection 0 = no damage<br> | ||
''dmg'' accumulated damage of subsections<br> | ''dmg'' accumulated damage of subsections<br> | ||
''max'' max health of ship | ''max'' max health of ship<br> | ||
''shields'' current value of ship shields (nil if doesn't have shields)<br> | |||
''shields_max'' max value of ship shields (nil if doesn't have shields) | |||
<br> | <br> | ||
'''Example:'''<br> | '''Example:'''<br> | ||
<source lang="lua">GetActiveShipHealth() -> 500 10 10 0 0 0 520 | <source lang="lua">GetActiveShipHealth() -> 500 10 10 0 0 0 520 1000000 30000 40000</source><br> | ||
ship has 500 | ship has 500 damage in frontal region, 520 dmg overall, a max health of 1000000, 75% shields, and 40000 shields max | ||
<br> | <br> |
Latest revision as of 04:20, 18 January 2016
GetActiveShipHealth
Definition:
GetActiveShipHealth() -> int d1 d2 d3 d4 d5 d6 dmg max shields shields_max
Description:
returns information about the active ships health
Returns:
d? damage to subsection 0 = no damage
dmg accumulated damage of subsections
max max health of ship
shields current value of ship shields (nil if doesn't have shields)
shields_max max value of ship shields (nil if doesn't have shields)
Example:
<source lang="lua">GetActiveShipHealth() -> 500 10 10 0 0 0 520 1000000 30000 40000</source>
ship has 500 damage in frontal region, 520 dmg overall, a max health of 1000000, 75% shields, and 40000 shields max