world
mob = /mob/character_creation
Problem description:
How can I change the mob path. I have been trying to do it like this but it doesnt seems to work at all
src =
/mob/player()
Code:
world Problem description: How can I change the mob path. I have been trying to do it like this but it doesnt seems to work at all src = |
Aug 9 2015, 10:04 am
|
|
So in order to change the path you need to create a new mob with player path.
My actuall prob is that I want to load the the player from the savefile. new_mob = new /mob/player() I manage to change the path and login works. But how can I manage loading proc. I tried something like this but im doing it wrong... LoadCharacter() |
What world.mob does is create a new mob of the specified type for any clients connecting to the world. This happens at the very first step of client creation, in client/New(). You need to call ..() (the parent proc) inside of client/New() for this to happen.
In order to access the client's variables of the specified type, you'll probably need to create a variable that is casted to that specific type, or handle the way it works in its Login proc: // client new example: (the latter approach wasn't personally tested by me though, so I am not 100% certain it works). |