I was trying to use the icon proc Shift() to offset an icon such that it would now occupy both the obj's current loc and an adjoining loc, but when I run it nothing shows up in the adjoining loc.
var/obj/Tc // Tc is just a 32x32 black square
var/icon/I = new(Tc.icon)
I.Shift(NORTH,9) // tried w/ 9, 18, 27, and 36
Tc.icon = I
My impression from the help on Shift is that if you have wrap = 1, the pixels would wrap to the other side of the same loc, and if wrap = 0, they would move on to the adjoining loc, NOT disappear.
However, unless there's a bug in Shift(), I need a new approach to accomplishing this. Any suggestions?
Thanks!
Nope; this only affects the icon, not its placement on the screen. The icon bitmap is just a picture; it has no inherent location. The atom you assign it to, however, does have a location.
atom.pixel_x and atom.pixel_y are just what you need.
Lummox JR