ID:169272
 
proc/MonMake(M,X,Y,Z)
spawn(1600)
new M(locate(X,Y,Z))
mob/enemies
icon = 'enemies.dmi'
var
HP; MAXHP; MP; MAXMP; expgive; goldgive; Strength; Intelligence; level=0; Speed; Unique=0;

var/mob/players/P

proc/Unique(speed)
while(src)
if (P in oview(5))
step_towards(src,P)
else
sleep(speed)
step_rand(src)
for(P in view(src))
break
sleep(speed)
spawn(speed)
Unique(speed)

proc/HitPlayer(mob/players/M)
var/damage = round(((rand(Strength/2,Strength))*(1.2)),1)
M.HP -= damage
s_damage(M, damage, "red")
CheckDeadPlayer(M,src)
proc/CheckDeadPlayer(var/mob/players/M,var/mob/enemies/E)
if(M.HP <= 0)
world << "<font color = green>[M] died to [E]"
var/G = round((M.gold/6),1)
M << "<font color = blue>You lost [G] gold"
M.gold-=G
M.loc = locate(M.relocation)
M.HP = round(pick(M.MAXHP/2,M.MAXHP/4,M.MAXHP))

slime
icon_state = "slime"
level = 1
Speed = 22
HP = 20
MAXHP = 20
MP = 5
MAXMP = 5
expgive = 2
goldgive = 3
Strength = 3
Intelligence = 2
New()
.=..()
overlays += new/obj/emeter1
Update()
spawn(1)
Unique(Speed)
Bump(mob/players/M)
if (istype(M,/mob/players))
Attack(M)

proc/Attack(mob/players/M)
flick("slimeattack",src)
sleep(2)
if (prob(25))
else
HitPlayer(M)

spider
icon_state = "spider"
level = 1
Speed = 18
HP = 45
MAXHP = 45
MP = 5
MAXMP = 5
expgive = 5
goldgive = 6
Strength = 4
Intelligence = 2
New()
overlays += new/obj/emeter1
Update()
.=..()
spawn(1)
Unique(Speed)
Bump(mob/players/M)
if (istype(M,/mob/players))
Attack(M)

proc/Attack(mob/players/M)
flick("spiderattack",src)
sleep(2)
if (prob(25))
else
HitPlayer(M)

proc/Update(mob/enemies/M)
for(var/obj/emeter1/N in M.overlays)
N.num = (src.HP/src.MAXHP)*N.width
N.Updater()

obj
emeter1
name = "HP"
icon = 'meter1.dmi'
screen_loc = "7,6"
icon_state = "0"
layer = MOB_LAYER+10
width = 16

proc/Updater().
if(num < 0)
num = 0
else if(num > width)
num = width
src.icon_state = "[round(src.num)]"

I don't know if it was necessary to post all of that, but I have the actual meter onscreen, I just can't get it to update, any ideas?

Unless mob/Enemies is a player (client), you can't add it to their screen. Go for an overlays with the pixel offset adjusted instead.
In response to DeathAwaitsU
Could you explain how this would work? <.>

I got the overlay on the enemy, but it wont update.
In response to Sinoflife
Gotta' call the update proc manually.
In response to Sinoflife
Sinoflife wrote:
I got the overlay on the enemy, but it wont update.

You have to call the update proc whenever a value that the bar is covering changes. :)

~'Sen.