Ok so i made my game where I have title screen and the creation screen on panes and when ure done with the creation you goto the map pane but question im wondering is where is the character you control while its being created?
I don't want it to be sitting on some map while its being made to be killed or something do I use the login() thing to spawn it on the map when im done creating cause atm there isn't any sort of login code since its all just panes
Dec 9 2013, 8:56 am
|
|
As long as you don't move your mob to a map, it won't be on the map. Also, you can set the mobs loc to null if you want to be certain.
|
In response to Mastergamerxxx
|
|
Mastergamerxxx wrote:
what happens if i set it to null what will it do? The mob will not have a location on the map. |
well atm i got
world and of course the whole mob/player icon thingy so how should i go about that should i remove it from the world thing or what? |
In response to Mastergamerxxx
|
|
Consider when the mob or client is initialized...
client/New() { This is assuming your mob viewpoint is not necessary in regards to your title screen, which it sounds like it's not. Technically, this just sets the mob's x, y, and z variables to 0, which is an unreachable spot on the map. |
Definitely not the way to handle that, you should be using a mob type just for the loading process, which will handle everything before the player is loaded.
world/mob = /mob/loading Then, inside of your loading process you transfer the loading mob to the loaded /mob/player by setting client.mob // When loading the mob, load it into a variable reference. Example, of course. Doing it this way gives you a lot greater control over how things are processed during player login and pre-loading. It also makes it possible to type-check for /mob/loading in sanity checks to prevent actions from happening to non-loaded mobs in some strange event that it happens to appear on the map. Type checking is going to be a lot more efficient than checking a bunch of variables to see if they've been loaded or not. |