ID:178379
 
mob/Stat()
statpanel("[usr]")
stat("Food",src.food)

how would i put an icon infront of the "food" Like les's game?
ShadowSiientx wrote:
mob/Stat()
statpanel("[usr]")
stat("Food",src.food)

how would i put an icon infront of the "food" Like les's game?

To put an icon in front, you have to put an atom in your stat panel instead of a number or text:
obj/foodicon
icon='food.dmi'

mob
var/obj/foodicon/foodicon

New()
..()
foodicon=new

Stat()
statpanel("[usr]")
foodicon.name="[food]"
stat("Food",foodicon)

Lummox JR
In response to Lummox JR
ahhhhhh

So is this the only way to show icons in the statpanel?

I've been fooling around with image and icon for a couple days and couldn't get it to work!!

argghh!!!

well now I know...

is there any other ways to do this though?
In response to Jon Snow
Jon Snow wrote:
is there any other ways to do this though?

In the stat panel, no. The only way to show an icon there is to display an atom, or a list of atoms (like inventory). If you want something more robust, you'll have to use a HUD system.

Lummox JR