ID:2213338
 
(See the best response by FKI.)
Code:
proc/GUIPickup(usr,obj)
var/mob/player/P = usr
var/obj/O = obj
var/obj/GUI/I = new /obj/GUI("",O.icon,O.icon_state)
I.plane = 8
I.maptext = "<font size=\"2\" color=\"black\" align=\"left\"> [O.name]"
I.maptext_width = 128
I.maptext_height = 32
I.screen_loc = "1,1"
P.client.screen += I
animate(I, maptext_y=56,pixel_y = 56, time = 80)
spawn(50) animate(I, alpha = 0, time = 30)
spawn(80) {del I}

obj/GUI/New(Name,Icon,IconState,ScrX,ScrY,Size=null)
name = "[Name]"
icon = Icon
icon_state = IconState
screen_loc = "1,1"
transform = matrix(ScrX,ScrY,MATRIX_TRANSLATE)
if(Size) transform *= Size


Problem description:
I am trying to improve user interface by making some basic item pickup report. It seems I cannot animate the pixel_x or pixel_y positin on screen objects to me because this works with other objects just fine and even the maptext on screen objects just not for the graphics.

Best response
You aren't seeing the effects of the animation because screen objects don't use pixel_x/y. An image is better suited for this I think.
By using transform = matrix(x,y,MATRIX_TRANSLATE) I was able to get it working but it was blurry like crazy. How would I even be able to use an image? This is supposed to be on the fixed left side of the screen when I get finished. Should I just attached an image to usr with x - world.view and only display the image to the user? So you are really saying it is worth having me abandon my strict screen objects practice so far to use images when it comes to animation correct?
In response to Zamargo
I need to know a bit more first. What exactly are you trying to use animate() for that it needs to modify pixel_x/y? I get that item objects are involved but don't understand how.

But yeah, if you want to animate pixel_x/y, then you need an image.

There is another less pretty option if images won't work as an alternative: you could make a function that modifies the object's screen_loc in the same manner animating pixel_x/y would. You are likely familiar with screen_loc's format: x:pixel_offset_x, y:pixel_offset_y. Modifying this in small increments would achieve the smooth transition you want.
I am trying to make a small report, like a display when an item is picked up to try and make my user interface look better. I was thinking a picture of the object that was picked up with my item plaque icon below it that scrolls and disappears shortly.

I am used to using screen objects for text stuff in this same manner and was hoping it would work with pixel_y, but I haven't had the need to animate a GUI piece yet so I'm in new territory now.
In response to Zamargo
Yeah, I think you may want to try out the workaround I mentioned in the last section of my last post.