ID:160474
 
Im trying to load the overlays from a saved file and create images so that at the load screen players can see their saved characters on screen to tell which slot they want to load, I cant get the overlays to appear
Can't really help without knowing a little more about how you're adding the overlays and saving them.
In response to Xooxer
ok well im using the built in write proc to save everything, and this is the standard equip code i use, (willing to change to get this working if I need to).
verb
Wear()
if(src.worn)
src.worn = 0
usr.overlays -= src.icon//temp icon
usr << "You remove the [src.name]."
src.suffix = ""
usr.UpdateBag(src.bagnumber)
else
src.worn = 1
usr.overlays += src.icon
usr << "You wear the [src.name]."
src.suffix = "Equipped"
usr.UpdateBag(src.bagnumber)
In response to NightJumper88
NightJumper88 wrote:
ok well im using the built in write proc to save everything, and this is the standard equip code i use, (willing to change to get this working if I need to).
> verb
> Wear()
> if(src.worn)
> src.worn = 0
> usr.overlays -= src.icon//temp icon
> usr << "You remove the [src.name]."
> src.suffix = ""
> usr.UpdateBag(src.bagnumber)
> else
> src.worn = 1
> usr.overlays += src.icon
> usr << "You wear the [src.name]."
> src.suffix = "Equipped"
> usr.UpdateBag(src.bagnumber)


That would work, or if you want to go complicated you can do with with mob/var for each individual item.
Have it when they logout, it will remove all icon images, and when you login, if the var of what they had on their overlays = 1 in the mobvars, then it will auto-equip all them overlays in that mob/var area, lol.
If you know coding that involves lists, you can use a meathod involving thoes also.
In response to NightJumper88
Ok, I see now. You're using just the icon of the item for its overlay. Are you using Read() to load the mob's savefile?
In response to Xooxer
when i load for the player i do, but not for what im having trouble with. Im not actually loadin the character im just applying images to an invisible mob so that the player can see what their saved player looks like, so i need to load the overlays to variables so i can make them images for the player
In response to NightJumper88
Hrm, then you might have to save a list of which icons they have overlaid, or try to load just the overlays from the player's savefile. Probably easier just to use the overlays list in the savefile, since it's already there.

I admit I don't know the exact method of doing that right off the top of my head. If you ttempt to load the saved mob, it'll log the player into it, which you don't want. I forget how exactly BYOND stores mobs, so you'll have to play with it a bit to get that overlays list out. Once you do, though, you should be able to just go through it and add each item in the overlays list to the temp mob. Providing the images already exist in your resource.