Doors must be placed on walls, as their function is to allow Sims to pass through walls. All doors are automatic; they open as a Sim approaches and close shortly after the Sim has gone through.
Some doors have male and female versions, and do not allow Sims of the opposite sex to go through, though they do not appear to affect NPCs. These doors are often used to construct single-sex bathrooms on community lots.
While The Sims did not include the ability to lock doors, lockable doors were available as custom content. Maxis added the ability to lock doors in The Sims 2: Open for Business and in The Sims 3: World Adventures. Depending on which game is being played and which expansion packs are installed, a locked door may or may not prevent Sims from being aware of what is behind it and wanting to get to it. Door locking is not necessarily all-or-nothing. In The Sims 2: University, playable Sims could knock on a locked Myne Door if the Sim who had claimed it was in the room it led to. The door locking introduced in Open for Business and World Adventures allowed a locked door to be set so that only household members could use it, or so only the selected Sim could use it. In The Sims 3: University Life, it is possible to set doors so that only certain Sims will be able to use them.
If an object such as a ceiling light occupies the space a door opens through, it may act to keep the door from closing. Moving the object may allow the door to close.
There is a glitch with both Open for Business and Bon Voyage: sometimes after using a door it will stay open, and never close. This can be annoying, but easily fixed by deleting the door with Moveobjects on and replacing it.
Doors and petsEdit
Doors in The Sims: Unleashed, The Sims 2: Pets, The Sims 3: Pets, and The Sims 4: Cats & Dogs are pet-sensitive; they open for pets just as they do for Sims. In Unleashed, the only way to keep pets out of a room is to use modified doors. In The Sims 2: Pets, The Sims 3: Pets and The Sims 4: Cats & Dogs, each individual door can be set so that pets either can or cannot use it.