ID:168347
 
mob/players
proc
NewChar()
if(!src.window)
src.window=1
var/prompt_title="Dragonball Pandemonium"
var/help_text="What do you want to name the character?"
var/default_value=src.key
var/char_name=input(src,help_text,prompt_title,default_value)as null|text
if(!char_name) {src.window=0;return}
var/ckey_name=ckey(char_name)
var/list/characters=client.base_CharacterNames()
if(characters.Find(ckey_name)) {alert("You already have a character named that! Please choose another name.");src.window=0;return}
var/list/classes=list("Half Saiyan","Saiya-Jin","Namek","Ma-Jin","Human-Type Android","Human","Changling")
help_text="Which class would you like to be?"
default_value="Saiya-Jin"
var/char_class=input(src,help_text,prompt_title,default_value)as null|anything in classes
var/mob/new_mob=new()
if(!char_class) {src.window=0;return}
else
switch(char_class)
if("Saiya-Jin") new_mob=new/mob/players/classes/saiyan()
if("Half Saiyan") new_mob=new/mob/players/classes/halfsaiyan()
if("Human") new_mob=new/mob/players/classes/human()
if("Namek") new_mob=new/mob/players/classes/namek()
if("Ma-Jin") new_mob=new/mob/players/classes/buu()
if("Human-Type Android") new_mob=new/mob/players/classes/android()
if("Changling") new_mob=new/mob/players/classes/changling()
else src.window=0
new_mob.name=char_name
src.client.mob=new_mob
var/turf/first_location=locate(5,4,2)
var/a
if(new_mob.type==/mob/players/classes/human||new_mob.type==/mob/players/classes/halfsaiyan||new_mob.type==/mob/players/classes/saiyan)
world<<"<font color=blue size=1><b>Server Information</b></font>: <b>[new_mob.name] ([src])</b> has entered the game.</font>"
new_mob.Move(first_location)
if(new_mob.type==/mob/players/classes/saiyan) a="Saiya-Jin"
if(new_mob.type==/mob/players/classes/halfsaiyan) a="Half Saiyan"
if(new_mob.type==/mob/players/classes/human) a="Human"
new_mob<<"<b>You feel a strange sensation as your spirit begins to form into the shape of a body. You are now a [a].</b>"
sleep(30)
new_mob<<"<b>Strange Man</b>, \"Hi, my name is Yamcha! You're new to this world, so here are how things are going to work.\""
sleep(40)
new_mob<<"<b>Yamcha</b>, \"First, you are going to select a skin tone, do this by double clicking me. After this, it will ask you if you are satisfied with your skin tone. Whenever you feel comfortable with your skin tone, select \"Yes\" when it asks you if you're satisfied.\""
else
if(new_mob.type==/mob/players/classes/buu) a="Ma-Jin"
if(new_mob.type==/mob/players/classes/android) a="Human-Type Android"
if(new_mob.type==/mob/players/classes/namek) a="Namek"
if(new_mob.type==/mob/players/classes/changling) a="Changling"
new_mob.loc=locate(1,1,3)
new_mob<<"<b>You feel a strange sensation as your spirit begins to form into the shape of a body. You are now a [a].</b>"
del(src)


This is the current title screen system I use, I have it to where when someone clicks the "New" button it runs this proc, but anyways, onto the main point.
I was wondering how I could make it to where the actual player can't move until the "conversation" ends. I have the variable set up to work under mob/players/Move(), and that part works, but I don't know how to set the variable correctly so that they can't move during the "conversation". Seeing as it sets src.client.mob to the new_mob variable before the conversation, src.move=1 isn't going to work.

I've tried a LOT of things and I remade my thread because it already had about 3 spaced bumps.
Once you switch from new_mob to src.client.mob it will keep the same vars, I think. If not, just reset it so that you can't move. Also, you switched the mobs, but then you do new_mob << you can just do src << instead. Also, you abused usr.
In response to Kalzar
It doesn't keep the same vars, I don't think. I tried src.move=1 but it doesn't do anything.
Telling me to set it to where they can't move isn't telling me how to do it. It's obvious I need to set it to where they can't move, that's what I'm asking for.
I don't see where I abused usr.
For some reason, src doesn't work after I set src.client.mob to new_mob.
In response to Artemio
Artemio wrote:
It doesn't keep the same vars, I don't think. I tried src.move=1 but it doesn't do anything.
I don't see where I abused usr.
For some reason, src doesn't work after I set src.client.mob to new_mob.

Try initiazing new_mob.

var/mob/new_mob = new()
In response to Kalzar
Nope.
Didn't do anything.
I already have a system set up like this. It's simple how I do it:
mob
var/locked = 0
Move()
if(locked) return 0
else ..()

person
verb
talk()
usr.locked ++
usr << "[src]: How are you?"
sleep(15)
usr << "[usr]: Good, thank you."
usr.locked --

That's how it's set up in my game, and it works fine.
In response to Popisfizzy
Yes, I know how to do it like that, but that's nothing at all like I have my character creation set up, thus that isn't going to work.
Because new_mob is a variable, I can't have it have its own Move() proc, so I can't do that.
if im correct, you disabled the mob from moving, but your changing the mob... disable the client from moving during that period of time
In response to Echtolion
If you mean setting a client var and doing the move prevention check under client/Move(), doesn't work.
"Cannot modify null.move" is what I get when I add in src.client.nomove=1 under the new char proc.