ID:176912
 
I have a bunch of different emotion icon states, their all just different faces for him, anyway i need to find out how to put these icons in the statpanel and have them change according to the character's reactions. All help is appreciated. Thnx in advance!

/\/Delita12345\/\
mob
Stat()
var/icon/I = new('Blah.dmi',"[usr.emotion]")
stat(I)
In response to Garthor
doesn't show icon...
In response to Delita12345
Oops, I don't think stat panels work with icons. Create a new object and assign I to it, then display that.
In response to Garthor
Garthor wrote:
mob
Stat()
var/icon/I = new('Blah.dmi',"[usr.emotion]")
stat(I)

I believe we've covered this ground before: stat() doesn't support the display of a raw /icon type. It only shows atoms.

Lummox JR
In response to Garthor
how would i do that? it won't let me put a New() proc in the Login(). That way it would make a new instance of the obj and move it directly to the user's contents.
In response to Delita12345
mob
var/obj/Face
New()
var/obj/O = new()
O.icon = icon
Face = O
Stat()
usr.Face.icon_state = usr.Emotion
stat(usr.Face)
In response to Garthor
review this and tell me what's wrong.

mob
servbot
var/obj/emote
New()
var/obj/O =new()
O.icon = 'servbot.dmi'
emote = O
var
iscommanded = 0
M
trans = 0

icon = 'servbot.dmi'
icon_state = "servbot"
Login()
usr.loc = locate(2,2,1)
usr << sound('Gesellschaft.mid',1)
usr << "Welcome to Servbot Command!"
..()

Stat()
usr.emote.icon_state = usr.emotion
statpanel("Servbot Status")
stat(usr.face)

I get this:

Servbot Command.dm:25:error:usr.emote.icon_state:undefined var
Servbot Command.dm:25:error:usr.emotion:undefined var
Servbot Command.dm:27:error:usr.face:undefined var
In response to Delita12345
usr is of type /mob. I guess it wouldn't work in your Stat() proc, since you keep on using servbot. Take out the usr's in the Stat() proc.
In response to Garthor
but i have the servbot defined as the standard like this:

world
mob = /mob/servbot
In response to Delita12345
Good for you. You changed world.mob. The usr var still is of the type /mob.
In response to Garthor
that got rid of one error, but i still have these
Servbot Command.dm:25:error:usr.emote.icon_state:undefined var
Servbot Command.dm:25:error:usr.emotion:undefined var
In response to Delita12345
ALL the usr's in the Stat() proc, not just the stat() proc.
In response to Garthor
another one down, one left.
Servbot Command.dm:25:error:emotion:undefined var

here's my Stat() proc

Stat()
emote.icon_state = emotion
statpanel("Servbot Status")
stat(emote)
In response to Delita12345
That is because emotion is not a var.
In response to Garthor
All right! I think i got it now. Thanx Garth!
In response to Garthor
Hey garthor, your multi tiled mob demo isnt working as you said it would be. If there are no HUD's what so ever on the screen, hosts cant see how the multi tile split, only the other players who experiences lag sees it. Good thing shadowdarke's add_fobj works.