mob
proc
LoadCharacter() // The load character proc
var/savefile/F = new("savefile/[usr.ckey]")
var/mob/newmob = new()
F["name"] >> usr.name
F["X"] >> usr.x
F["Y"] >> usr.y
F["Z"] >> usr.z
F["mob"] >> newmob
world << "[src.name] has logged in!"
newmob.loc = locate(x,y,z)
newmob.client = src.client
src.saveable = 1
usr.sight = 0
Problem description:
Well, when i Try to load with this code, it doesnt move the mob to the saved Location, and it doesnt blackscreen them. (found the blackscreen problem except it wont unblackscreen)
it creates the Mob, names it, then drops it on the title screen
Ive been stuck on this problem for a while, every way i go turns into a dead end, any point in the right direction would be greatly apreacated
I've never seen anyone set mob.client to another client, but I have seen it done frequently as something like client.mob=new_mob, where you are setting the client's mob variable, rather than the mob's client var.
Also, what's up with your code? I'm assuming it came from different sources, because it alternates between from the use of usr and src religiously, when it should really only use src.
Edit: Well, after the client.mob has been changed, src will no longer reference the new mob, so use the reference that you created for the new mob for its operations
Hiead