UI name in toolbox: deactivate [TASK]
Block type: Statement block (executes in sequence)
Definition: Temporarily disables one or more tasks while the condition remains true. Tasks re-enable when the condition becomes false.
When it executes:
- Tasks are disabled while the condition is TRUE
- Tasks are re-enabled when the condition becomes FALSE
- This is reversible and re-evaluates continuously
Important characteristics:
- NOT permanent (unlike other action blocks)
- Uses virtual logic (the condition is continuously evaluated)
- Can behave unexpectedly—use with caution
- Reverses immediately when condition becomes false
How to build it:
- Drag
deactivate [TASK]from Actions category - Connect a task block to the
[TASK]socket - Place inside
thensection of WHEN-THEN block (not canvas)
Input requirements:
[TASK]input: must be type Task
How it works:
- Condition becomes TRUE
- Specified tasks become unavailable (grayed out or hidden)
- Condition becomes FALSE
- Tasks become available again (automatically re-enable)
Example (Simple):
WHEN: score < 100
THEN: deactivate [bonus task]
Result: Bonus task is unavailable until score reaches 100; when score ≥ 100, task re-enables
Example (Edge Case – Overlapping deactivation):
Rule 1: WHEN score < 100 → DEACTIVATE [Task 5]
Rule 2: WHEN timer > 5 min → DEACTIVATE [Task 5]
Result: Task 5 is deactivated if either condition is true (re-activates only when both are false)
Caution – Unexpected behavior:
- Using NOT blocks with Deactivate can create confusing state logic
- Contradictory deactivation rules may cause unpredictable behavior
- Test thoroughly before deploying
Example (Avoid this complexity):
WHEN: logic_negate [task 1 finished] → DEACTIVATE [bonus]
WHEN: logic_negate (logic_negate [task 1 finished]) → DEACTIVATE [bonus]
Result: Confusing double negation; use clearer logic
Notes:
- Temporary and reversible (unlike hiding tasks permanently)
- Useful for conditional task gating
- Powerful but requires careful logic design
- Disable/enable happens in real-time as condition changes
Common mistakes:
- Creating overly complex deactivation chains
- Expecting permanent deactivation (it reactivates when condition becomes false)
- Using with contradictory conditions (causes unclear behavior)
- Over-relying on deactivate for game flow (use simpler patterns when possible)