Code:
obj/Medical
layer = MOB_LAYER + 1
icon = 'buttons.dmi'
icon_state = "heal"
New(client/C)
screen_loc = "3,1"
C.screen += src
Update(C)
Click()
alert("I'm sorry, but Im still working on this!", "Combat")
proc/Update(client/C)
var/mob/M
for (M in world)
if (!isnull(C) && !isnull(M))
if (M.key == C.key)
if (M.BattleNumber && M.menu==1)
if (M.Jtype.Find("Healing"))
icon_state = "heal"
else
icon_state = null
else
icon_state = null
spawn (5) Update(C)
client/New()
new/obj/Medical(src)
..()
Problem description: The problem is that the button does not appear on the screen at all. I have no clue if its the basic function of it or if its the Update proc. IF you can help I would be greatful. Either way thanks for having a look.
It's possible Update() is turning the icon_state null.