I'm still having some trouble seeing where the client comes into use in a BYOND game. I understand that when a player logs in, he, the client, is connected to the world.mob and gains control of that movable object. What I don't understand is where it comes into use other than that and macros?
Also, if I may add, how could one make a procedure that when one logs into a game, the game checks if said person already has a savefile or not?
ID:154808
Dec 17 2011, 1:10 pm
|
|
In response to AlexandraErin
|
|
Thank you very much. I suspected that's what the client did, but you verified it. About the save-check procedure, though. How would one check if a savefile connected to a certain client is present?
|
In response to Pinnacle
|
|
Upon logging in, you could use this;
if(fexists("savefile_directory/[src.ckey].sav")) That would check is a savefile is present and you could choose to load it, delete it, over write it, whatever you choose. |
Example: a board game with limited players might have mob/spectator as the default world.mob type. When a player actually joins the game in progress (instead of watching or waiting), they're connected instead to a mob of type mob/player. The original mob is deleted, the client remains, and can have vars tracking their in-game name, current local stats, whatever.