ID:169913
 
Every time I try to make a save code, where there is an overlay on the character. it stays on if there is a reboot. I have tried things like src.overlays-=/obj/OverlayName and on the Logout(), Client/Del(), and even in logout procs. I even had them in multiples and they still won't go away After there is a reboot or even exiting from the game.

Note: The Overlays are like spell effects which surround the player, like a fire shield. If there is a reboot or logout while the player has the overlay active, it won't go away. thats the main problem.
You need to remove everything from the overlays list before the player is saved. I'm not sure of what procs would be a good place to do that, but there should be previous posts in the forum along the same lines.
In response to Jon88
Jon88 wrote:
You need to remove everything from the overlays list before the player is saved. I'm not sure of what procs would be a good place to do that, but there should be previous posts in the forum along the same lines.

It'd be in the mob/Write() proc. And, then in mob/Read(), reapply the correct overlays/underlays.

EX:

mob
Write(savefile/F)
F["overlays"]<<null
F["underlays"]<<null
F["icon"]<<null //This also saves space on savefiles
return ..(F)
Read(savefile/F)
src.icon=new/icon(initial(src.icon))
//etc...
return ..(F)

In response to Teh Governator
thx for your help, I looked up the Cut() proc and I found this
src.overlays.Cut()
put into the login, will get everything removed on login, but thx for your help people.