var/obj/e=new
e.icon='excavator.dmi'
e.icon_state="open"
e.pixel_x=-64
e.mouse_opacity=0
e.loc=locate(src.x,src.y,src.z)
spawn(10)
animate(e,pixel_y=500,time=10)
spawn(10)
animate(e,pixel_y=-64,time=10)
Problem description:
I have tried to get this code to work the way I want it but, it is driving me up the wall. What I want to happen is.. I want the excavator icon to move up 500 pixels, smoothly. Then after roughly, 1 second come back down to its original place again, smoothly. Instead of a smooth transition I am getting some really weird movements.
The shovel is where the excavator icon should be stopping.
I feel like I am just doing something obviously wrong but I can't figure it out.
animate proc:
You don't need those spawn()s, basically, and leave out the e on the secondary calls to animate().