mob
icon='Base Icon.dmi'
icon_state="Tan"
var
health=100
max_health=100
energy=200
max_energy=200
exp=0
max_exp=500
proc
updateExp()
var/percent=round(src.exp/src.max_exp*100,10)
if(percent>100) percent=100
if(percent<0) percent=0
for(var/obj/hudMeters/o in src.client.screen)
o.icon_state=num2text(percent)
spawn(10)
src.updateExp()
updateHealth()
var/percent=round(src.health/src.max_health*100,10)
if(percent>100) percent=100
if(percent<0) percent=0
for(var/obj/hudMeters/p in src.client.screen)
p.icon_state=num2text(percent)
spawn(10)
src.updateHealth()
updateEnergy()
var/percent=round(src.energy/src.max_energy*100,10)
if(percent>100) percent=100
if(percent<0) percent=0
for(var/obj/hudMeters/q in src.client.screen)
q.icon_state=num2text(percent)
spawn(10)
src.updateEnergy()
Problem description: The Energy meter and the Health meter work great when together but when the exp. meter is added with 0 as a starting instead of max, both the energy and the health meter reflect their updates on the experience meter. im running low on ideas on how to make the exp. meter an individual meter that reflects on its own stats