Boolean Flags (0 / 1 Switches)
📌 What you will learn
Use simple 0/1 variables to track doors unlocked, bosses defeated, invulnerability, or pause state.
Core approach
A flag variable remembers whether an event has already happened so scripts can react without duplicating scenes.
- Name flags clearly: "has_key", "is_paused", "boss_defeated".
- Reset every flag to 0 under the green flag.
- Toggle a flag cleanly with "set flag to (1 - flag)".
Pro tip & next steps
Flags are the secret to clean adventure games and multi-phase bosses.
FAQ
What is the best first step for "Boolean Flags (0 / 1 Switches)"?
Name flags clearly: "has_key", "is_paused", "boss_defeated". Flags are the secret to clean adventure games and multi-phase bosses.
This guide is provided for educational purposes. Scratch screens and terms may change over time, so please check the official Scratch website as well.