ID:150127
Dec 8 2001, 7:46 pm
|
|
Does anyone know how to make locked doors that require a key with the same number as the door without codeing each door seperately?
|
You can make a GM verb that creates a key and connects it do a door in-game. Example:
obj key icon = 'key.dmi' var obj/door/unlocks mob verb keyCreate(obj/door/D in view(1)) var/obj/key/K = new() K.unlocks = D K.loc = src keyInfo(obj/key/K in view(1)) var/door/D = K.unlocks src << "This key unlocks the door at [D.x],[D.y],[D.z]" A GM can now stand next to a door and create a key that unlocks it. This works if you only want a key to unlock one door. If you want the key to unlock several doors, you need a unlocks list in the key instead of a var. /Andreas |
Chew on that...