ID:180668
 
how would i get a health meter that shows how much health the mob has left to appear over top of the players icon when a mob is attacked. I'm guessing you'd use the flick command to get the stat meter to show up but how would you get it to show how much health it has left.
heres the code that i use for the health meter.

mob
var
obj/meter/meter
health = 20
maxhealth = 20

New()
..()
src.meter = new /obj/meter

Stat()
src.meter.num = (src.health/src.maxhealth)*src.meter.icon_states
src.meter.Update()
statpanel("Stats")
stat("Health:",src.meter)


obj
meter
icon = 'meter.dmi'
icon_state = "0" //that's zero, not ( ) or O
var/num = 0
var/icon_states = 30
proc/Update()
src.icon_state = "[round(src.num)]"

On 4/10/01 8:15 pm Haroki wrote:
how would i get a health meter that shows how much health the mob has left to appear over top of the players icon when a mob is attacked. I'm guessing you'd use the flick command to get the stat meter to show up but how would you get it to show how much health it has left.

You can try emailing ebonshadow about that, he had a health meter thing in Shadow Realms that showed up above the players.

heres the code that i use for the health meter.

Well, that's all fine and dandy (and such excellent coding! I wonder who did it? ;-), but that's for statpanels. Displaying over the map is a very different thing indeed.
In response to Spuzzum
On 4/13/01 2:30 pm Spuzzum wrote:
On 4/10/01 8:15 pm Haroki wrote:
how would i get a health meter that shows how much health the mob has left to appear over top of the players icon when a mob is attacked. I'm guessing you'd use the flick command to get the stat meter to show up but how would you get it to show how much health it has left.

You can try emailing ebonshadow about that, he had a health meter thing in Shadow Realms that showed up above the players.

uhh anyone know Ebon's email address?
In response to Haroki
uhh anyone know Ebon's email address?

Just do a forum search with posts made by his name. I'm too busy to do it myself. ;-)