ID:176065
 
hello... I have a door, and I have a verb: Open Door

Should the door be a turf or an object, mob?

If I'm right next to the door, then I want it to open when I use the verb. How can this be done also? Thanks
Jerico2day wrote:
hello... I have a door, and I have a verb: Open Door

Should the door be a turf or an object, mob?

Your best bet is to go with object.

If I'm right next to the door, then I want it to open when I use the verb. How can this be done also?

obj/door/verb/Open_Door()
set src in oview(1)
//Door coding here.


~>Volte
In response to Volte (#1)
ok, i got that, got the door all in there, got the command showing up when im next to the door.. but now i feel like the ultimate newbie...how do i remove the door until the player passes over it, and the door is put back once the player is past?
In response to Jerico2day (#2)
obj/Door
icon = 'Blah.dmi'
Exited()
src.icon_state = "Closed"
src.density = 1
tell if this works
In response to Buzzyboy (#3)
not really, now the player just walks over it. The player needs to open it using the open verb and then be able to walk through. After the player walks through the door needs to shut. Thanks for the help so far
In response to Jerico2day (#4)
Jerico2day wrote:
not really, now the player just walks over it. The player needs to open it using the open verb and then be able to walk through. After the player walks through the door needs to shut. Thanks for the help so far

I don't think there is an easy way to do that using objects as doors. The best I can see that isn't too complicated would be;
obj/door
density = 1
verb/Open_door()
set src in oview(1)
src.invisibility = 1
src.density = 0
sleep(20)
src.invisibility = 0
src.density = 1


Which opens the door for 2 seconds, and then closes it. If you make the door a turf, you can do what buzzyboy suggested.

~>Volte
In response to Volte (#5)
worked well thanks