ID:147809
 
I'm trying to get password protection on doors that teleportyou to the room on another map this is what Itlooks like:

turf/ChurchDoor
icon = 'Door.dmi'
Entered()
usr.loc = locate(10,2,2)

I have no idea what to do, please help me :p
and if u have any other pw door codes plz tell me about them
Thanks for reading this and for your time.
Kristof wrote:
I'm trying to get password protection on doors that teleportyou to the room on another map this is what Itlooks like:

turf/ChurchDoor
icon = 'Door.dmi'
Entered()
usr.loc = locate(10,2,2)

You're being sort of vague as to what you mean by 'password protection on doors', so I'll assume that you want it to prompt the user for the correct password.

turf/ChurchDoor
icon = 'Door.dmi'
Enter(mob/M) // We want to call Enter(), which is called *before* the mob enters
if(ismob(M)) // Make that it's a mob that entered
var/attempt = input("What's the password?") as text
if(attempt == "SuperMalver")
M.loc = locate(10,2,2) // Wee! Teleportation!
return // Don't let the mob/atom in
In response to Malver
THANX MAN! IT WORX!!
In response to Kristof
Kristof wrote:
THANX MAN! IT WORX!!

I don't get why these aolers replace k with x? I mean..whats so horrible about typing two more letters? I wouldn't be so fast with typing if it weren't for "'s", I think? O.o;.
In response to Karasu Kami
1st of all I DESPISE AOL.
@nd of all It loox cooler
In response to Kristof
You now have my permission to shut up.
In response to Garthor
Woah. I do not remember typing in all caps and using "X' in the place of "KS." (Not just k, moron.)

Another thing is I do not use AOL, and I would also prefer if AOL fell off of the face of the Earth along with its users.