Does anybody know how to make doors close and lock again by themselves after a player opens them? I need this for an arena i’m building, where you teleport in, fight a lvl based encounter, then collect the key off the boss to exit. The door automatically removes the key upon opening, which is great, but when I reenter the arena, and get the key again, the door is still open so there is no use for the keys after it’s been opened the first time. The idea is a repeatable arena challenge quest where the player must defeat the boss in order to exit. Everything else is working so far with it, I just need that door to reclose. Any help is appreciated! Thanks.
I’m guessing this is for NwN as opposed to NwN 2. See the scripting FAQs. Also Look at this pinned thread. Finally this should have been posted in a module building forum.
object oDoor = GetObjectByTag("ARENA_DOOR"); AssignCommand(oDoor, ActionCloseDoor(OBJECT_SELF)); SetLocked(oDoor, TRUE);
Thank you! That works perfect!