mob
verb
AdvancedFlick(T as text)
for(var/advancedflick/E in advancedflicks)
if(E.name == T)
var/myicon = icon
var/myiconstate = icon_state
icon = E.icon
pixel_y = -32
pixel_x = -32
flick(E.icon_state,src)
sleep(3)
icon = myicon
icon_state = myiconstate
pixel_y = 0
pixel_x = 0
Problem description:
There's a delay between the icon being set and the pixel_y, causing some flickering issues. I can't figure any way to work around it.
Fix: Change it to spawn(3) AND INDENT EVERYTHING BELOW IT. If you do not indent the event under the spawn(), it'll not happen after 3 ticks - instead, it'll happen right away.