ID:1028629
 
Code:
ValentineHouse
Enter
icon='Turf.dmi'
icon_state="Kk"
Enter()
if(src.Locked==1)
return
else
usr.loc=locate(/turf/Transports_Metropolis/ValentineHouse/Exit)
verb
Locking()
set src in view(1)
switch(alert(usr, "The Lock Value is currently [src.Locked]", "Lock", "Unlock","Lock","Cancel"))
if("Lock")
if(usr.Lastname=="Valentine")
hearers()<<"<i>[usr] locks the door.</i>"
src.Locked=1
if("Unlock")
if(usr.Lastname=="Valentine")
hearers()<<"<i>[usr] unlocks the door.</i>"
src.Locked=0


Problem description:

Well, it's an invisible layer over a door turf that leads to somewhere else. I want it to be toggleable for members of the family(house belongs to Valentine), to be able to lock/unlock it. For some reason, with this code, I can't even right-click the turf, or see the verb in commands?

You could just check if(Locked) rather than going through src.Locked==1. Also, I don't see any reasoning for the Locking() verb to be hidden, as long as you are within a tile's distance. I'm alittle busy so I'm trying to rush these along, of course. So I'm sure someone else will help you better than I.