mob/verb/set_icon(I as icon|anything in oview(1)) icon = I
When I use this piece of code, it allows the user to use the command set_name for anything that is in in their view, but within one tile. However, when the user uses this command, the icon becomes nothing. There is nothing there and the user cannot even be selected.
I have tried several variations for finding a way to allow the user to at minimum, inherit the object's icon_state, but am failing hard on it. I am also interested in having a usr inherit the object's properties so that usr can be interacted with by other users as if they were the real object that they inherit.
If possible, I would like two sections of code provided to me, one to allow the user to inherit the icon state and one to inherit the entire object's properties completely. I'm ripping my hair out trying to figure this out and I suspect because I'm only on chapter 4 of the guide, that I shouldn't even be trying to accomplish this as of yet.
Thank you for any help.
Anyways, doing what you want is incredibly simple. I suggest finishing the guide and doing some tutorials.
That said, I will reply to your question for future reference.
The only types of objects that have icons are /atom. And, what you really want is to select an atom and gain an icon.
/area, /turf, /obj, and /mob are the basic atoms you can put onto the map.
So, you'd do something like:
(Also, note the <dm></dm> html tags to display the code.)