Spielerando

Pressure Plate Puzzles

A pressure plate sinks while enough weight rests on it, and a door or bridge opens when every plate is down at once. The player, a crate or a creature can weigh a plate down. A plate lifts only after a short delay, and the door stays open a little longer.

Also called: Pressure plates, Floor switches, Weight plates, Step-on switches.

A stout badger mason stands on one of three floor plates beside a mossy boulder resting on another, both pressed down, with lines of light running to a shut far door. The third plate is still raised.
Mortise and Mole, an invented dungeon puzzle game. Invented game, image generated with AI.

Paste this to your AI

Copy it into Claude, Cursor or ChatGPT. It already has good values and the usual mistakes in it.

Add "Pressure Plate Puzzles" to my game.

What it should do: Plates turn the level itself into a puzzle: the player has to work out what to put where, and how many things it takes, before the way ahead opens.

Build it exactly as this state machine. First check that it fits my game, then build it like this:

```mermaid
stateDiagram-v2
  [*] --> idle
  idle: Waiting
  partial: Some plates down
  open: Open
  grace: Closing soon
  idle --> idle: no plate is down
  idle --> partial: a plate goes down
  idle --> open: all plates at once
  partial --> partial: some plates stay down
  partial --> idle: the last plate lifts
  partial --> open: the last plate is down
  open --> open: all plates held
  open --> partial: a plate lifts, no wait
  open --> idle: all lift, no wait
  open --> grace: a plate lifts
  grace --> grace: the wait runs
  grace --> open: all plates down again
  grace --> partial: wait ends, plate down
  grace --> idle: the wait ends
```

Use these starting values:
- pressWeight: 1 units
- releaseDelay: 0.3 s
- holdTime: 1.5 s

Watch out for these common mistakes:
- The plate flutters on its edge: Tell your AI: when the weight leaves, keep the plate down for a short delay, and put it back to the full delay whenever weight returns.
- Two light things do nothing: Tell your AI: add up everything on a plate first, and compare only the total.
- No plates means open: Tell your AI: the target opens only if there is at least one plate and every plate is down.
- A saved game disagrees with the floor: Tell your AI: do not save which plates are down. Work it out again from what lies on each plate in the first step after loading.
- The door shuts before the player gets there: Tell your AI: keep the target open for a hold time after the plates stop all being down, and restart that time whenever they are all down again.

Do not change anything else in the game. Do not claim anything without proof: model what it takes, and show me what your solution rests on and how I can see that it works. If you cannot show something, say you do not know. When you are done, tell me in plain words how to try it.

Or skip this and connect the MCP: your AI then finds all of this by itself.Connect the MCP

What it does

Plates turn the level itself into a puzzle: the player has to work out what to put where, and how many things it takes, before the way ahead opens.

How it runs, as a diagram

Everything it can be in, and what moves it on. Your AI builds from exactly this.

no plate is downa plate goes downall plates at oncesome plates stay downthe last plate liftsthe last plate is downall plates helda plate lifts, no waitall lift, no waita plate liftsthe wait runsall plates down againwait ends, plate downthe wait endsWaitingSome plates downOpenClosing soon
How it runs, as a diagram
  • Waiting → Waiting: no plate is down
  • Waiting → Some plates down: a plate goes down
  • Waiting → Open: all plates at once
  • Some plates down → Some plates down: some plates stay down
  • Some plates down → Waiting: the last plate lifts
  • Some plates down → Open: the last plate is down
  • Open → Open: all plates held
  • Open → Some plates down: a plate lifts, no wait
  • Open → Waiting: all lift, no wait
  • Open → Closing soon: a plate lifts
  • Closing soon → Closing soon: the wait runs
  • Closing soon → Open: all plates down again
  • Closing soon → Some plates down: wait ends, plate down
  • Closing soon → Waiting: the wait ends

Good starting values

ValueStart withWhat it changes
pressWeight1 unitsThe weight a plate needs to go down. With the player at 1, a plate of 1 takes anyone, 2 takes a crate or two creatures, and a small light thing alone does nothing.
releaseDelay0.3 sHow long a plate stays down after the weight leaves. It keeps the plate from fluttering when something moves across its edge.
holdTime1.5 sHow long the target stays open after the plates stopped all being down. About the time to walk from the last plate to the door. Zero makes the door follow the plates exactly.

What usually goes wrong

The plate flutters on its edge

A crate or a player slides across the edge of a plate. The weight counts, then does not, then counts again, and the plate and the door click on and off.

Fix: Tell your AI: when the weight leaves, keep the plate down for a short delay, and put it back to the full delay whenever weight returns.

Two light things do nothing

A plate needs weight 1, and two small creatures of 0.5 stand on it. The code looks at them one by one, so neither is heavy enough and the plate stays up.

Fix: Tell your AI: add up everything on a plate first, and compare only the total.

No plates means open

A puzzle with no plates yet, or one whose plates were all removed, counts as solved because nothing is missing. The door stands open from the first moment.

Fix: Tell your AI: the target opens only if there is at least one plate and every plate is down.

A saved game disagrees with the floor

The save remembers that a plate was down, but the crate that held it was not saved where it was. The plate stays down with nothing on it, or the door opens with no one to hold it.

Fix: Tell your AI: do not save which plates are down. Work it out again from what lies on each plate in the first step after loading.

The door shuts before the player gets there

The player steps on the last plate, steps off to run to the door, and the door closes the moment the plate lifts.

Fix: Tell your AI: keep the target open for a hold time after the plates stop all being down, and restart that time whenever they are all down again.

How to check it works

Works well with

Common questions

how do pressure plate puzzles work in games

A plate on the floor sinks while enough weight rests on it. A door or bridge opens when every plate is down at once, so the player has to find enough things to stand on them, or a way to hold one down.

how long should a door stay open after a pressure plate is released

Start with about a second and a half. That is the time to walk from the last plate to the door. Use zero for puzzles where the player has to keep standing on the plate.

why does my pressure plate flicker

Something sits on its edge and the weight counts one moment and not the next. Keep the plate down for about 0.3 seconds after the weight leaves, and restart that wait whenever weight returns.

what do i tell my ai to add pressure plates

Paste this: Add pressure plates. A plate goes down when the weights on it add up to 1, and comes up 0.3 seconds after the weight is gone. The door opens only when there is at least one plate and every plate is down, and stays open 1.5 seconds longer.

Where it comes from

We could not find a reliable origin for this one yet.

Where this mechanic comes from has not been researched yet.

Games are named only as references. Names and marks belong to their owners, and nothing here is endorsed by them.

What was checked

This is what separates the blueprint from a catalogue entry: the values on this page come from code that runs.

Your AI gets the code

Tested example code comes through the Spielerando connection, so your AI can use it right away. How to connect it