ID:170602
![]() Jan 4 2005, 10:52 am
|
|
I have different races in my game (who doesn't?) such as man, dwarf, elf, etc. How do I get people of a certain race start at a certain place when they log in?
|
![]() Jan 4 2005, 10:55 am
|
|
at the end of character creation put..
|
Use switches, they're much shorter.
switch(src.race) |
I used that code, but how do I make it so that the user sees their location without having to use my verb "look"? (My game is text based)
|
My game uses the names, not coordinates. I tried substituting the coordinates with the name, but it keeps saying a.name is an undefined var. I'm pretty sure it is.
|
Dession wrote:
Heh yours is 5 lines mine is only 4..Trust me, switch is better in the long run. It saves a lot of "else"s. |
Seraphrevan wrote:
My game uses the names, not coordinates. I tried substituting the coordinates with the name, but it keeps saying a.name is an undefined var. I'm pretty sure it is. Oh. mob/var/area/spawn Then set their spawn to that, then use "spawn.name". |
Dession wrote:
I never said it was worse/better I am just pointing out you said yours is shorted but it is not. I guess I wasn't descriptive enough. You'll be using less "letters". |
Dession wrote:
Wow yours is 46 letters mine is 55 BIG difference. Seirously 9 letters isn't going to kill you. Just saying, it's faster then doing else if(q==pie) You can EASILY shorten it up and go faster by using switch() |