atom/proc
addOverlay(icon_file, state)
var/image/A = image(icon_file, icon_state=state)
A.layer = MOB_LAYER + 55
src.overlays += A
removeOverlay(icon_file, state)
var/image/A = image(icon_file, icon_state=state)
A.layer = MOB_LAYER + 55
src.overlays -= A
... and this is the implementation of those procs - in an attack proc.
// This is part of a larger proc
M.loc.addOverlay('Attacks.dmi', "DA")
spawn(8)
M.loc.removeOverlay('Attacks.dmi', "DA")
I tried using a /turf/var to store M.loc and using that, but it had the same effect.
When this happens and the attacker is me, I get a runtime error. Otherwise, I don't. The error is a Cannot find null.loc-flavor error.
What could I do to fix this?
--Vito