ID:168427
 
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","Majin Buu","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
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("Majin Buu") new_mob=new/mob/players/classes/buu()
if("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(1,1,2)
var/a
world<<"<font color=blue size=1><b>Server Information</b></font>: <b>[src.name]</b> has entered the game.</font>"
if(new_mob.type==/mob/players/classes/saiyan) a="Saiyan"
if(new_mob.type==/mob/players/classes/halfsaiyan) a="Half Saiyan"
if(new_mob.type==/mob/players/classes/human) a="Human"
if(new_mob.type==/mob/players/classes/human||new_mob.type==/mob/players/classes/halfsaiyan||new_mob.type==/mob/players/classes/saiyan)
new_mob.Move(first_location)
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 {first_location=locate(1,1,3);new_mob.Move(first_location);new_mob<<"<b>You feel a strange sensation as your spirit begins to form into the shape of a body.</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.
Okay well I am not totally sure of this. But basically all you would have to do is 'lock' the new_mobs movement until the conversation is done.


So make a variable.

Define it to 1.

Have the new_mob move() proc check to see if that variable is 1.

If it is, return, and dont allow it to move.

Then at end of the conversation, set the variable to 0.
In response to XxDohxX
I thought of that, but you see, new_mob is only a variable, not an actual mob type.
In response to Artemio
Well if it's an actual variable, wouldn't calling the variable in the client/North() and sort be the same thing? Because client isn't an actual mob, it can be something like a spectator moving and it would so it. So do what I said under client.
In response to XxDohxX
XxDohxX wrote:
Well if it's an actual variable, wouldn't calling the variable in the client/North() and sort be the same thing? Because client isn't an actual mob, it can be something like a spectator moving and it would so it. So do what I said under client.

I tried this;
client/Move()
if(usr.client.mob==new_mob) return
else ..()

And now I can't move, and yes I know I used usr, but src.client.mob or client.mob turned up as an undefined variable.
In response to Artemio
Well, as long as its working, and it doesn't cause any trouble. Use it.
In response to XxDohxX
You seem to have misunderstood me, I can't move. At all.
That's a bad thing.
In response to Artemio
Oh! Do you ever set your mob to an actual mob, or it stays at new_mob?
In response to XxDohxX
Basically, what it does is generates some things such as the mob type under new_mob, then sets new_mob to the client.mob, then the conversation happens.
I did set world/mob to /mob/players, though.
In response to Artemio
client/North()
if(src.mob.NoMove)return //If the variable is true, lock the movement.
..()
In response to Mega fart cannon
As I said, I know how to set it to where players can and can't move by the use of a variable, my problem is that I don't know HOW to set it to where it is 1 upon the use of the proc, and 0 after the conversation or after it teleports you into the "real world".

[edit]

I made a proc that does the conversation part, and I called it under NewChar() using a world<<"This worked!" to make sure it worked, as well as a src<<"This worked!", but for some reason the proc doesn't want anything to do with src and decides to tell "This worked!" to the world and stop.
In response to Artemio
Bump.
In response to Artemio
Artemio wrote:
Bump.
In response to Artemio
Artemio wrote:
Artemio wrote:
Bump.