17. Ask a simple yes-or-no question
Figure 13. If Variable compares one runtime variable with its Equals value.
1. Add If Variable after the event entry.
2. Select key_taken.
3. For a Boolean variable, clear Blank / null and choose True for Equals.
4. Connect TRUE to the already-collected response.
5. Connect FALSE to the pickup actions.
6. Test once with the flag false and again after the pickup has made it true.
The graph takes exactly one of those outputs. It does not run both responses. An unconnected chosen output ends that route, which can be useful when nothing should happen on the false branch.
| Stored value | Equals | Expected route |
|---|---|---|
| Boolean false | Boolean true | FALSE |
| Boolean true | Boolean true | TRUE |
| Text "true" | Boolean true | Different value types; correct the input. |
| null / missing | Boolean false | A missing flag is not a deliberate false default. |
If the typed Equals editor changes unexpectedly when you choose a different variable, check the new variable’s declared type and default. Do not keep the old value by habit.
