ID:172528
 
Door
var/open = 0
var/see
var/pword = ""
icon_state = "doorshut"
name = "Door"
density = 1
opacity = 0


RIGHT HERE
proc/open()
set background = 1
src.density = 0
src.opacity = 0
src.open = 1
flick("opening",src)
src.icon_state = "dooropen"
sleep(40)
src.density = 1
if(src.see == 0)
src.opacity = 0
else
src.opacity = 1
src.open = 0
flick("closing",src)
src.icon_state = "doorshut"


I know to add something there like if owner == key but how do I add it so only if the person who made the door can enter I already made a var for the creator of the door to be the owner
...
It sounds to me like you already solved it... what exactly are you asking?
Or maybe I'm just slow..
In response to Sensi
Use a verb instead of a proc, you call proc from various locations in your code, while for a verb you would right click on the door, or be standing near it and type "Open" to make it open like you want it to, but if you meant for it to be a proc and not a verb then i cant help you.
If you want this door to open when, say, stepped into, then it's simple.
atom/proc/Bumped(atom/movable/bumped_by)
atom/movable/Bump(atom/O)
if(O) O.Bumped(src)

obj/Door
Bumped(atom/movable/A)
if(ismob(A))
var/mob/M = A
if(M.client && M.client.ckey == owner)
Open()

Lummox JR