Locks and spawn points

"A locked door is a scene. An unlocked door is a corridor." — Quartermaster Dell Vass

/add lock stops a door or trigger from working, and /add spawnpoint decides where players arrive when they respawn.

You need the story tools permission to place locks and spawn points. /add, /edit, /remove and /list share one permission, held by community admins and above in the shipped config. See permission bits.


What it does

A lock either seals a door completely or gates it by character rank. A sealed door will not open for anyone. A rank-locked door stays fully operational and turns away anyone below the rank you set, with a message you write. A lock annotates the map's own door, so /remove <id> unlocks it rather than deleting it.

Spawn points control where the map puts players. Placing your own is how you stop a scene in a hangar from throwing respawning players into the duel arena the map builder chose.


Using it

Locking a door

Close the door first. A full lock is refused on an open or moving door so nobody gets sealed in a doorway. Triggers have no open or closed state and lock at any time.

Aim at the door and run /add lock. Add a number from 1 to 8 for a rank lock instead of a full lock, where 1 is the highest rank.

Where your crosshair cannot reach the door, use the entity number form instead. Run /trace triggers to see the numbers.

Rank names are set by the server admin. The outputs on this page show the fallback label, Rank 2, which appears when the server has not named its ranks. On a configured server the rank's own name, for example Section Chief, appears in its place.

Writing a refusal message

The entity number form takes a trailing message, shown as a centre-screen line to anyone the lock turns away. You can also set it later with /edit <id> message.

Argument order matters. The argument after the entity number is read as the rank only when it is a single bare digit from 0 to 8. Anything else starts the message, so a message beginning with a number needs an explicit rank first. Use 0 for a full lock with a message.

Without a custom message, a rank lock falls back to a standard line:

The label carries the word "rank" itself, so the sentence reads the same either way. A configured server prints "This requires Section Chief or higher" from the same line.

A full-locked door with no message gives a buzz at the door and no text, and a full-locked trigger prints "It's locked." instead. Either way, a player gets the refusal at most once every 2 seconds.

Placing a spawn point

Spawn points appear at your feet, facing the way you are facing. Stand where you want a player to arrive, look the way they should be looking, and run /add spawnpoint.

Add a number from 1 to 8 to reserve it for one rank. Fix the facing afterwards with the yaw argument on /edit <id> move.

What players can do to your locks

Players with Tech 2 can lock and unlock doors themselves with /lock and /unlock, without any story tools permission. /lock gates the door at their own character rank, exactly like your /add lock <rank>.

/unlock picks rank locks, including yours. It only works when the player's rank could already open the door, and it removes the lock for everyone rather than only letting them through. A full lock cannot be picked.


Commands

Adding a lock

Locking by entity number

Changing the refusal message

msg is an accepted alias for message. Use none to clear it.

Unlocking

/remove lock aimed unlocks whatever you are aiming at, and /remove lock ent <num> unlocks by entity number.

Adding a spawn point

spawns is an accepted alias for spawnpoint.

Changing a spawn point

Removing spawn points

/remove spawnpoint nearest takes out the closest one within 256 units, which is the quickest undo.

Player lock commands

These are the 2 commands players can point at your locks.


Things to note

  • A full lock needs the door closed. Aim at an open door and you get "Close the door before locking it". A rank lock has no such requirement, because the door keeps working.
  • Rank locks work on 4 classnames only. They are func_door, func_door_rotating, trigger_multiple and trigger_once. Anything else is refused rather than accepted and quietly ignored.
  • A door's reach trigger is not the door. Target the door itself. The game tells you the right number when you get it wrong.
  • Spawn point ranks are an exact match, not a minimum. /add spawnpoint 2 admits rank 2 characters and nobody else, including rank 1. Lock ranks are the opposite and mean "or higher".
  • The map always keeps at least one spawn point. Removing the last one by id is refused, and a bulk wipe drops a failsafe at your feet and says so.
  • Players with Tech 2 can pick your rank locks. /unlock needs no story tools permission, and it removes the lock for everyone. Only a rank that could already open the door can crack it, and a full lock is safe.
  • /lock and /unlock need Tech 2, a character rank and a living character. A spectating player cannot use them.
  • Locks only accept one edit. message is the single property. Everything else is refused, and /remove <id> is how you undo the lock.
  • Nothing marks a locked door on screen. Use /trace triggers or /list locks to find them again.

Next

  • Remap: redress the map's surfaces once its doors behave
  • Placing entities: the shared /add, /edit and /remove rules these commands follow