ID:267354
 
What should happen: The user logs in to a finely designed title screen, he or she then clicks on a button to login. When the button is clicked, the user goes through a character selection process. Once the character has been selected and a name has been entered, the user is logged in to a specific location on the map, given in X,Y,Z. Now the game beings.

The problem: Well, all goes well until the user is logged onto a specific location on the map. Instead of placing the user where I have said, the user is placed at the location of 1,1,1,.

The Code:

///////////////////////////
/////Character Choice//////
///////////////////////////
world
mob = /mob/create_character
turf/grass
icon='grass.dmi'
mob/Blob
icon ='Blob.dmi'
mob/Goop
icon = 'Goop.dmi'
mob/create_character
var/mob/character
Login()
var/charactername = input("Enter a name","Name",src.key)
switch(input("Choose a character","Character Choice","Blob")in list("Blob","Goop"))
if("Blob")
character = new /mob/Blob()
usr.loc = locate(69,201,1)
if("Goop")
character = new /mob/Goop()
usr.loc = locate(69,201,1)
character.name = charactername
src.client.mob = character

////////////////////////////
///////Title Screen/////////
////////////////////////////
mob/spectator
icon = null
Move()

New()
..()
loc = locate(104,143,1)
Logout()
..()

world
mob = /mob/spectator


turf/start_button
icon = 'startbutton.dmi'
Click()
if(istype(usr,/mob/spectator))
usr.client.mob = new/mob/create_character()
usr.loc = locate(69,201,1)
// Thank you for any help, all is appretiated, I have tried all I could think of, does anyone have any ideas?
I think you are setting a createcharacters location, then switching to the mob... try a character.loc instead of usr.loc.
In response to Nova2000
well, for one your using usr in your login code instead of src (usr is ok in single player, but in multi player....no its bad in some procs)
In response to Wanabe
This is a single, solo adventure type game, just with character choosing.