ID:267936
Dec 27 2003, 7:09 pm
|
|
Ok, I got a problem. whenever I logout the clothing overlays get frozen on the usr, any way to stop this?
|
You can delete the overlays by reversing the process you used to add them, and check this on logout.
for(var/O in src.overlays) del(O) ..() |
In response to Polatrite
|
|
Polatrite wrote:
You can delete the overlays by reversing the process you used to add them, and check this on logout. mob Logout() for(var/O in src.overlays) del(O) ..() I added that. when I logout I get this... runtime error: bad del proc name: Logout (/mob/Logout) usr: Mystic Water Mouse (/mob) src: Mystic Water Mouse (/mob) call stack: Mystic Water Mouse (/mob): Logout() Mystic Water Mouse (/mob): Logout() Mystic Water Mouse (/client): Del() Mystic Water Mouse (/client): Del() did I screw something up? |
In response to Mystic Water Mouse
|
|
No. Try replacing those two lines with src.overlays.Cut()
|
In response to Jon88
|
|
No errors, but I still logged back in with the clothing frozen on me.
|
In response to Mystic Water Mouse
|
|
mob You might try that. However, I do have to ask: are you using Deadron's character handling lib? If so, you need to go through it and find where the mob is saved during log out. As I recall, the saving is done at the client level, not the mob, and saves the mob before mob.Logout is called. |
In response to sapphiremagus
|
|
You might try that. However, I do have to ask: are you using Deadron's character handling lib? If so, you need to go through it and find where the mob is saved during log out. As I recall, the saving is done at the client level, not the mob, and saves the mob before mob.Logout is called. i am using the deadron lib, thanks for the tip. |
In response to sapphiremagus
|
|
sapphiremagus wrote:
> mob You might try that. However, I do have to ask: are you using Deadron's character handling lib? If so, you need to go through it and find where the mob is saved during log out. As I recall, the saving is done at the client level, not the mob, and saves the mob before mob.Logout is called. hey, thanks. that worked just fine. now can anyone tell me how i would make a save file to store the overlays so i can reload them upon login? |
In response to Mystic Water Mouse
|
|
You can't save the overlays. What you can do is rebuild them when the player logs in, based on the information that you can save (like what items are equipped).
|
In response to Crispy
|
|
Crispy wrote:
You can't save the overlays. What you can do is rebuild them when the player logs in, based on the information that you can save (like what items are equipped). AH! DUH! I'm so stupid! Why didn't I realize that? Thanks! |
In response to Mystic Water Mouse
|
|
Well actaully you can save the overlays to the player like making a new icon and take them away by using either
src.overlays += /obj/HPmeter or usr.underlays -= (icon('Charater.dmi',,icon_state="Horse")) that just much simpler then doing that del(O) stuff |
In response to Darkfirewolf5
|
|
That's not saving the overlays. That's adding and removing overlays, which he already knows how to do.
It may be simpler, but inferior solutions are often simpler. =P |
Well, the first thing to stop is conflating "a player" and "usr". There's no such thing as "the usr"--especially in Logout().
Lummox JR