ID:1514104
 
(See the best response by Pirion.)
Code:
var/obj/some_random_object
var/obj/o
o.pixel_x = 64
some_random_object.overlays = image(o.icon,o.icon_state)
//...wait, why isn't it offset by 64 pixels?
world << o.pixel_x //Value is indeed 64.


Problem description:
When using the method above, pixel_x does not seem to actually work and instead everything is on top of each other (at pixel_x 0, more or less) despite pixel_x having the correct values. I wonder, is there some special way that you have to do it to get it to work?
Best response
You're creating a new image with o's icon and state, nothing else. You should be able to add o to the overlays directly.
In response to Pirion
Pirion wrote:
You're creating a new image with o's icon and state, nothing else. You should be able to add o to the overlays directly.

Before I fell asleep, I realized that was the problem (I was seriously coding all day). Essentially I am redoing /HUD/Text in my library to use images attached as overlays to a single text object instead of just screen objects simply due to the fact that you click through them. BUT, I can probably get away with multiple transparent screen objects (similar to the previous way) with images attached so that click-thru would still work.