Guard and investigate
Capture a stimulus once, hold it on the blackboard, and give the guard a branch that goes and looks before it gives up.
On this page
A thrown coin is a fact that keeps changing, so the guard stores one copy and investigates that instead.
The problem
Section titled “The problem”Throw a coin behind a guard. It should turn, walk over, look around, find nothing, and go back to its route. Done with a bool the guard investigates the newest noise every frame and never arrives anywhere, because the fact keeps changing under it.
The shape
Section titled “The shape”Split it in two. One branch captures a stimulus and stores it; a lower branch acts on the stored copy until it expires.
Guard2.bqbehavior does exactly this. Its capture stimulus Sequence runs three nodes: newest eligible signal pending, store one stimulus payload atomically, then consume the captured signal. Below it, the investigate branch works from the stored payload through enter suspicious, a dwell, a validity check, move to the stimulus, and look around, with a sibling that expires a stale stimulus first.

Guard2 in Live. The investigation branch owns the tick, and hold and face the active stimulus is the node actually running; the validity check and the walk to the stimulus wait their turn beside it.Storing the stimulus is what makes the walk finish. The guard commits to one coin instead of re-deciding against whatever is newest.
Reuse it
Section titled “Reuse it”Reach for this whenever the game hands the actor a fact that keeps changing: the newest noise, the latest damage direction, the last seen position. Capture it once into a blackboard value, then act on the stored copy until it expires, and the actor finishes the trip it started. Your code keeps the ranking rules; the graph just decides when to commit.
Nodes it uses
Section titled “Nodes it uses”- Sequence for capture, and again for the investigation steps.
- Member condition for
newest eligible signal pendingand the staleness check. - Method for store, consume, move, and look, all of which stay in the game’s own guard code.
- Selector above the two investigation branches so expiry is checked before dwelling.
The hearing rules, stimulus ranking, navigation, and the catch reset are Dungeon Heist C#. The graph decides which of them gets this moment.
- Patrol and chase: the priority list this branch lives in.
- Dungeon Heist chapter: coin throwing, guard ranges, and the rest of the scene.