I have a spell "thunderbolt" which when used creates an overlay over the target (in the shape of a thunder bolt!) plays an animation (striking the ground) then is deleted.
Problem description:
I'm having trouble overlaying my spells onto turfs. Overlaying them onto mobs and objs create no problems, however when I try to use a lightning bolt type spell no animation is played, just the last frame. The icon is 50x200 pixels and has 8 frames in the animation. It is set to loop once. When I set it to loop infinately, the animation plays. I've tried to use flick but when flick is used nothing overlays!
var/target = caster.lasttarget//a turf using turf/MouseEntered()
var/tmp/obj/attack/ThunderBolt/effect = new()
target:overlays += effect
sleep(10)
target:overlays -= effect
attack.Move(target) does what I want, it displays an object at the desired location however randomly, when I do use the spell the icon appears in completely random grid cells in my inventory or belt.
var/tmp/obj/attack/ThunderBolt/effect = new()
effect.Move(target)
Clicking a turf and creating the projectile would be done in <small>client/Click( turf/turf )</small>: