mob
proc
Choose_Test()
//if(src.character=="good"||src.character=="bad")
var/Test = input("Where we you like to hit up?")in list("Level 1","Way Of The One","Turtles Throwback","Door Testing","Open World")
if(Test == "Way Of The One"&&testchosen==0)
src.client.view="13x9"
if(src.character=="Blue")
for(var/obj/Portal/Stage_3/GO in world)
src.loc=GO.loc
var/mob/player/Good/Blue/dude = new/mob/player/Good/Blue
dude.loc=GO.loc
src = dude
src.CreateName()
spawn(12) knockback(src, 6)//(10) knockback(src, 6)
src << sound('give credit to dpggioli cave ambience.wav', TRUE)
src.camera.px=235//64
src.camera.py=192//96
//spawn(1) src.client.perspective=EYE_PERSPECTIVE
src.camera.mode=3
//src.camera.lag=-1000
src.fixedpx=235//80//128//160//192//64
src.fixedpy=192//96//128//96
//src = new/mob/player/Good/Blue
//var/mob/player/Good/Blue/G = new/mob/player/Good/Blue()
Problem description:
I've hit a standstill. I implemented a character select screen, something I expected to take an hour but has been taking me all day. I wanted it to be like Mega Man, in the way that it jumps from location to location, high-lighting the character square icon you fall on. Therefor it had to override my gravity and keyboard libraries, so (k=="left") now jumps the player to a specific location on the character screen instead of moving them. I handled this by making players whom login a specific mob which doesn't acknowledge the usual procs that govern the world.
Now, that character select screen works like a charm, but, whenever you press space to create the character and bring up my "Choose_Test()" proc which brings up a list of places to teleport you to. Previously, this worked fine, since players were randomly given a character to be on login:
world
New()
var/character=rand(1,2)
if(character==1)
mob = new /mob/player/Good/Blue()
if(character==2)
mob = new /mob/player/Good/Cyan()
if(character==3)
mob = new /mob/player/Bad/Benjamin()
But now, I made it so depending on where your square is on the title screen, you will be given a character variable of the name of the character. That variable in turn is suppose to create a character in the coordinates the "Choose_Test()" usually would take you to. It doesn't. I've been tampering at this forever, sometimes I can make the mob and not teleport to the proper location, sometimes I can teleport to the location but not create the mob. So what's the best way to handle creating a mob, teleporting it to a location and having a player become it w/o manually changing icons, icon_states, variables?(The actual mob/player/... handles a lot and therefor the player cannot manually be made).
Note: The code provided in the code section is the result of trial and error. It's poorly written, but, does create the mob and does bring the player to the location. It just won't make the player become the mob.
to assign the client to that mob. It should be noted that this will also trigger Login() for that mob.
As a side note, that variable declaration for "dude" could be simplified to: