Flip it
Inverter turns one branch's Success into Failure and back, so you can express "only when this is not true" without a second condition.
On this page
The smallest node in the set. Inverter wraps one child and swaps its Success and Failure, so a branch can run because something did not work.
The problem
Section titled “The problem”A Platformer patrol should only walk the route while the route is open. You already have a check that answers “is the route blocked”, and you want the opposite answer. Authoring a second, mirrored check means two facts that can disagree, and the day they disagree you have a bug in two places.
DocumentationDecorators.bqbehavior keeps that shape as the Inverter called not blocked over a Condition named route is blocked.
When to reach for it
Section titled “When to reach for it”- Reuse one authored check in both directions, so “door is open” and “door is not open” stay the same fact.
- Turn a member call’s failure into the thing you were waiting for: an interaction that reports Failure while an object is busy becomes Success once it stops being busy.
- Turn a succeeding probe into a branch guard, where success means “somebody already did this” and you want the branch that handles the other case.
See it
Section titled “See it”
A decorator has no card of its own: it renders as a chip on top of its child’s card, and that one card carries the status pill. On a GameObject agent that pill marks the node holding the tick, so what you watch is the cursor leaving the probe and the branch above it moving on with the flipped answer. The Graph runtime status card in the rail is where the result itself is written out, and an entity graph paints a result on every card it evaluated.
-
Open
Assets/Platformer/Behavior/DocumentationDecorators.bqbehaviorand select the Inverter called not blocked. -
Read the rail. There are no value fields: the semantic line plus a Child reading, because the only thing to author is which single child it wraps.
-
Select the child, route is blocked. It reads the
route_blockedblackboard variable. -
Set
route_blockedto true in the Live blackboard while an agent runs this graph. The child succeeds, the Inverter reports Failure, and the Sequence above stops on that result. -
For a blackboard fact, read the result rule below before you rely on the false case. Comparing the variable directly, with the Condition’s own comparison set to
==and the valuefalse, reports Success when the route is open.

How it decides
Section titled “How it decides”Inverter swaps exactly two results and passes everything else through. It holds no state and ticks its child once per parent visit.
Result
- Success
- The child returned Failure.
- Failure
- The child returned Success.
- Running
- The child is still Running. Inverter has nothing to swap yet.
| Child result | Inverter result |
|---|---|
| Success | Failure |
| Failure | Success |
| Running | Running |
| Blocked | Blocked |
| Interrupted | Interrupted |
| Timeout | Timeout |
| Authority mismatch | Authority mismatch |
That fourth row is the one that surprises people. A blackboard Condition whose comparison is false reports Blocked, and Blocked passes through an Inverter unchanged, so wrapping a blackboard Condition inverts the true case alone. The product’s own test pins that pass-through.
Two ways to negate a blackboard fact:
- Invert the comparison inside the Condition: choose
==and the valuefalse, which reports Success when the variable is false. - Use a Member condition and set its false mapping to Failed. Failure is the result an Inverter flips.
When it goes wrong
Section titled “When it goes wrong”When it goes wrong
| Symptom | Check | Fix |
|---|---|---|
| The branch never runs when the fact is false. | Look at whether the child is a blackboard Condition, which reports Blocked instead of Failure. | Invert the comparison inside the Condition, or bind a Member condition whose false mapping is Failed. |
| Everything under the Inverter behaves backwards. | Read how much subtree the decorator wraps. | Wrap the single check, and keep the work outside the Inverter. |
| A Timeout or Interrupted result was expected to flip. | Those results pass through by design. | Handle them in the branch above, where the typed reason is still readable. |
| Validation says a decorator needs exactly one child. | Count the children on the canvas. | Leave one child attached. Group several checks in a Sequence and wrap that. |
- Actions and conditions: where Blocked comes from and what a member condition maps.
- Only if: a gate that keeps checking instead of flipping.
- Inverter reference: the full result table.