turf/Create
layer = MOB_LAYER+150
creating_character
icon = 'create.bmp'
Click() usr.NewChar()
density = 1
mob/Login()
src.loc=locate(7,7,10)
mob/creating_character
Login()
..()
src.loc=locate(37,27,1)
world << "[usr] has just entered '[world.name]'!"//We tell the world that someone has just joined the game now
usr.sight = 1
// src.Create() //This tells the src to lookup "CreateCharacter"
/proc/NewChar()
Start //We use this just in case the character makes a null name and if so we get brought back here.
var/mob/new_mob //We are declaring a new variable called "new_mob" which will be used in alittle minute
var/char_name = input("Please put your character name in here.","Name") as null|text //The player makes their name here
if(char_name == null) //Here we tell the game to make the player rename his/her character if they did not pick a name
goto Start //This makes us go back to the "Start" if the characters name is null
var/char = input(src,"Pick your character!") in list("Half-Demon","Human","Demon") //The player chooses his/her character here
switch(char)
if("Half-Demon")
new_mob = new /mob/player/HalfDemon/InuYasha //Looking up the path "/mob/player/human"
if("Human")
new_mob = new /mob/player/Human/Kagome //Looking up the path "/mob/player/monkey"
if("Demon")
new_mob = new /mob/player/Demon/Naraku
// src.Logout() //This is what logs out the player from the game is no gender is chosen.
new_mob.name = char_name //Here is where we assign the player chosen name to the mob.
new_mob.loc = locate(27,6,1) //Here me make the new player start off at the location of X:1, Y:1, Z:1.
// src.client.mob = new_mob //Here we tell the game that there is a new mob/player in the game
..()
del(src)
i'm wondering why when you're at the title screen u click and nothing happens.
1
2
ID:148301
Apr 16 2003, 11:06 pm
|
|
In response to Hazman
|
|
the code is there!
|
In response to Crispy
|
|
so, i delete the 1st code and put the new code there? or put it where
mob/creating_character proc/newchar() is? |
Do not repost threads. The old one was still on the main page. At worst you should have bumped that, not posted a brand new thread. This doesn't even seem to have any new code in it.
Lummox JR |
In response to Lummox JR
|
|
i thought someone would know the answer...
|
In response to YamiGotenks
|
|
And then they would answer THAT post, and simply ignore your new, redundant post.
|
In response to Garthor
|
|
well, noone usually loks at new posts and this has different coding than the last
|
In response to YamiGotenks
|
|
People look at new posts all the time, and that's no excuse for making a second post, because the second post would be NEWER than the first one, thus you just contradicted yourself. Not only that, but people DID look at this NEW post. Second, you can reply to your old post with new coding as well, it's not that hard. Never cross-post. Ever.
|
In response to Garthor
|
|
ok well i just need help now...thanx 4 the advice..
|
In response to YamiGotenks
|
|
YamiGotenks wrote:
well, noone usually loks at new posts and this has different coding than the last The only thing I saw that was the least bit different was the number 150 instead of 100. You're still using the goto, which I showed you how to get rid of with a while() loop last night. So you're not even implementing the suggestions you've got. Lummox JR |
In response to YamiGotenks
|
|
No. Hell no. Read my post again, carefully this time.
|
In response to Lummox JR
|
|
I TRIED the WHILE() proc, it doesn't work...
|
In response to Crispy
|
|
so my code would be:
Click() if (istype(usr,/mob/create_character))//The player is a "creating character" mob usr:NewChar() //Normally, don't use the colon. We have to use it here because BYOND doesn't know that if we reach this point, then the mob is "creating_character". We do know it, so it's safe to use the colon (:). else //Whoops, not a creating character mob world.log << "[usr] clicked on [src] but is not a creating_character mob" //Error message output to game host mob/create_character Login() ..() src.loc=locate(37,27,1) world << "[usr] has just entered '[world.name]'!"//We tell the world that someone has just joined the game now usr.sight = 1 // src.Create() //This tells the src to lookup "CreateCharacter" mob/create_character proc/NewChar() Start //We use this just in case the character makes a null name and if so we get brought back here. var/mob/new_mob //We are declaring a new variable called "new_mob" which will be used in alittle minute var/char_name = input("Please put your character name in here.","Name") as null|text //The player makes their name here if(char_name == null) //Here we tell the game to make the player rename his/her character if they did not pick a name goto Start //This makes us go back to the "Start" if the characters name is null var/char = input(src,"Pick your character!") in list("Half-Demon","Human","Demon") //The player chooses his/her character here switch(char) if("Half-Demon") new_mob = new /mob/player/HalfDemon/InuYasha //Looking up the path "/mob/player/human" new_mob.energylevel = 10 new_mob.maxenergylevel = 10 new_mob.maxstamina = 100 new_mob.purity = 2 new_mob.will = 5 new_mob.honor = 3 if("Human") new_mob = new /mob/player/Human/Kagome //Looking up the path "/mob/player/monkey" new_mob.energylevel = 5 new_mob.maxenergylevel = 5 new_mob.maxstamina = 100 new_mob.will = 5 new_mob.honor = 5 new_mob.purity = 5 if("Demon") new_mob = new /mob/player/Demon/Naraku new_mob.energylevel = 50 new_mob.maxenergylevel = 50 new_mob.maxstamina = 100 new_mob.will = 5 new_mob.honor = 5 new_mob.purity = 1 this should be it... |
In response to YamiGotenks
|
|
well, using while() without any arguments...of course it won't work, you must have an argument/variable in there to tell it to continue it.
|
In response to YamiGotenks
|
|
YamiGotenks wrote:
I TRIED the WHILE() proc, it doesn't work... The frell it doesn't. If you tried it and it didn't work, then you should post the code you used it in, because you did something wrong. What you need to do is fix it so that while() does work, not go back to the old faulty goto. Just because new code may give you a problem doesn't mean it's not a step in the right direction. You have to work through those problems. Lummox JR |
In response to Lummox JR
|
|
well...i need the while code agian cause i'm not using it now
|
In response to Goku72
|
|
i had a code..with while in it with variables
|
In response to YamiGotenks
|
|
YamiGotenks wrote:
well...i need the while code agian cause i'm not using it now Instead of: Start var/char_name Lummox JR |
1
2
2. Because of the leading slash, NewChar() is being set up as a global proc. Not good. Remove the leading slash from "/proc/NewChar()".
3. Removing that slash will probably give you an error about usr.NewChar() not being defined. So change /turf/Create/creating_character/Click() to:
<code>Click() if (istype(usr,/mob/creating_character)) //The player is a "creating character" mob usr:NewChar() //Normally, don't use the colon. We have to use it here because BYOND doesn't know that if we reach this point, then the mob is "creating_character". We do know it, so it's safe to use the colon (:). else //Whoops, not a creating character mob world.log << "[usr] clicked on [src] but is not a creating_character mob" //Error message output to game host</code>