ID:148083
 
I am trying to have items equiped with an inventory image and a floating image for the player's icon.

I have created both but when I equip it, it floats the inventory image over the player instead of the floating one.
heres the coding...

obj/item/armor
mithril_chest
icon = 'mithril icons.dmi'
icon_state = "mithril chest plate"

verb
equip()
usr.overlays += src


Its not all, but its everything that has to do with the layers, images, etc.

-----------------------------------------------------------

THANK YOU! I know how frustrating it is to spend solving someone else's problems. Also, I noticed that hardly anyone thanks the veteran DMs that are constantly saving noobs (like me) from having to read FAQs and Tutorials 'till
their eyes bleed... So to make up for the loss of the majority... THANK YOU!
you want the armor icon to appear on the equipper right?
try this:
define a variable called armoroverlay (mob/var/armoroverlay) and then do something like this:
mob/verb/equip()
src.armoroverlay= /obj/item/armor/mithril_chest
src.overlay+= src.armoroverlay

//and the reason you don't simply put:
     src.overlay+= /obj/item/armor/mithril_chest
//is because when you unequip it would be more simple to just type: src.overlay-= src.armoroverlay.

i hope this is what you were looking for and i hope it helped.
note: i could be way off! and also note that the indentation is done with spaces not tabs so i suggest not copying and pasting that code.
In response to Siefer
Thank You!

I worked with that "new variable" strategy and got it working the 7th attempt. This will finish my new object coding and make additional object orienting much easier.
Thanks again.
In response to Xallius
my pleasure.