Jump to content

Closing a door


temnix

Recommended Posts

In one of my mods the party is transported outside of the area to spots in front of the building where they were just now. One of the regions there runs a script that does the rest of the job: disables the travel region that leads inside the building and shuts the front door. This last part, with CloseDoor(), isn't working. I'm writing there the name of the correct door, there are no errors, but it simply doesn't shut. What could be causing this? And also, is it impossible in the BG version of the engine to disable a door so that it's no longer highlighted? I think Torment used to do that.

Link to comment

Doors don't close if there's an object inside of their blocking region. Can't remember if CloseDoor() gives a damn about it, though.

 

Not directly possible, although if you *really* want, then you can remove clickable polygon from your door entirely and instead add two another invisible door objects (say, Closed and Opened) with their "closed" polys matching the main door's closed and opened states and no polys for their opened state. Then you start with:

Main - closed (no poly), Closed - closed (visible clickable poly), Opened - opened (no poly)

When player clicks on Closed, its attached script does OpenDoor("Main") CloseDoor("Opened"), so now you have:

Main - opened (no poly), Closed - opened (no poly), Opened - closed (visible clickable poly)

Clicking on Opened similarly changes Main and Closed back to initial closed state.

When you want to disable Main entirely, just CloseDoor("Main") OpenDoor("Opened") OpenDoor("Closed"), so that the passage is blocked and no polys are active.

Link to comment
Guest tipun
18 hours ago, temnix said:

The second part's too complicated. But the first - there is no one blocking the door. The party is well away. It's just not getting shut.

Is there a Door Locked flag on the door?

Link to comment

No. I do Lock it myself, but only after the CloseDoor action. I need to do some more testing of this, with other doors, but it should be easy. By the way, can someone confirm that a door with Lock difficulty 100 gives the "This door does not have a conventional lock and may be warded..." message? I get that message even without setting "Magic lock."

Link to comment
4 hours ago, temnix said:

By the way, can someone confirm that a door with Lock difficulty 100 gives the "This door does not have a conventional lock and may be warded..." message?

This is a thing, yes. You can pick a lock with difficulty 98, 99, 101, 102 etc. but not 100.

Link to comment
Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...