...but none of them bring up the input screen. Here's my new code, it makes the most sense to me out of all i tried.
mob
worker
icon = 'worker.dmi'
client/New()
src.icon_state = input("What job would you like to have?" in list("Construction","Metro"))
if (icon_state == "Construction")
new/mob()
icon_state = "Construction"
loc = locate(1,1,1)
if (icon_state == "Metro")
new/mob()
icon_state = "Metro"
loc = locate(1,1,1)
What's wrong??!?!!?!?!
ID:176938
Nov 26 2002, 9:32 am
|
|
Nov 26 2002, 9:36 am
|
|
client is not part of mob... what you have done is created a type of mob called mob/worker/client, and made it so that when this mob (called "client") is created, it will bring up an input screen. client is actually a totally separate object from mob, though. If you only want this code to execute when someone connects to a mob of type mob/worker, change the line that says clien/New() to just say Login(). client/New() is what happens on the client's side of things, Login() is what happens on the mob's.
|
In response to Lesbian Assassin
|
|
ok, how about this?
Login() usr.icon_state = input("What job would you like to have?" in list("Construction","Metro")) if (icon_state == "Construction") icon_state = "Construction" loc = locate(1,1,1) if (icon_state == "Metro") icon_state = "Metro" loc = locate(1,1,1) ..() |
In response to Delita12345
|
|
Take out those if() statements, they are entirely unneeded, as is the loc = locate(1,1,1).
|