ID:146365
 
Code:
mob
Bump(atom/movable/A)
if(istype(A, /obj/TrainingObjects/HealingPod/healbottom))
var/obj/hairon = src.overlays
src.overlays -= hairon
src.loc = A.loc
src.move = 0
src.dir = SOUTH
there
sleep(1)
src.HitPoints += 10
if(src.HitPoints >= src.MaxHitPoints)
src.HitPoints = src.MaxHitPoints
src.overlays += hairon
src.loc = locate(src.x,src.y-1,src.z)
src.move = 1
else goto there


Problem description:
When I remove the overlays they don't come back. Please respond with the answer to my problem or atleast something to help me figure it out.
its mostly because you're defining a var for the overlays, but you're removing the overlays after that. So the var actually holds nothing then.
I don't know for sure but I hope this will work.
mob
Bump(atom/movable/A)
if(istype(A, /obj/TrainingObjects/HealingPod/healbottom))
var/obj/hairon = src.overlays
src.overlays = null
src.loc = A.loc
src.move = 0
src.dir = SOUTH
there
sleep(1)
src.HitPoints += 10
if(src.HitPoints >= src.MaxHitPoints)
src.HitPoints = src.MaxHitPoints
src.overlays += hairon
src.loc = locate(src.x,src.y-1,src.z)
src.move = 1
else goto there


I'm not really sure that this will work =P.

O-matic
Make a seperate list that holds all of the overlays. Use for() to loop through the different overlays. Then set the overlays to null and then loop throug the other list and add them to the overlay list.