ID:267016
 
High everyone, to make this frank, im creating a spy game. I wana know how to make a spy open a door, and go into a room. The door has to be closed at first, and trhen when you open it, you can pass. If you know how to do this, please tell me. I think its pretty simple. I just forget how to. Please reply a.s.a.p
obj
Door
opacity = 1
density = 1
icon = 'Whatever.dmi'
New()
src.verbs += /obj/Door/Manipulation/Open
Manipulation
verb
Open()
set src in oview(1)
//Set density
//Set opacity
//Set icon
src.verbs -= /obj/Door/Manipulation/Open
src.verbs += /obj/Door/Manipulation/Close
Close()
set src in oview(1)
//Set density
//Set opacity
//Set icon
src.verbs += /obj/Door/Manipulation/Open
src.verbs -= /obj/Door/Manipulation/Close

If you don't know how to fill in the commented blanks, then back to the guide you go!
In response to Garthor
i used this but when you open the door it doesent display an opened door like i want instaid the door just disapears........ how can i stop it and make it display an opened door instaid
In response to SuperLink
By setting the icon correctly.
In response to Garthor
this is easier isnt it??

obj
door
icon = 'door.dmi'
opacity = 1
density = 1
verb
open()
src set in Oview(1)
icon = 'dooropen.dmi'
density = 0
opacity = 0
sleep(20)
density = 1
opacity = 1
icon = 'door.dmi'
//i think that works (at school now) and it seems easier!
In response to Spoon
Sure it's easier, but it's wrong. First of all, you can open an already open door. Second of all, it's oview, not Oview. Third of all, it's set src, not src set.
In response to Garthor
Srry!
Dude i said i was at school at the time!
Im sorry i made an attempt!
-Spoon!
In response to Spoon
Don't take it like that. Garthor was just pointing out problems in your code. Learn from the experience and you'll do better next time...

On the other hand, it's usually best to know how to program something before you try and help people with it.

--Crispy, who tried to help newbies when he was a newbie. Suffice to say that it was a bad idea. :P