Exploring conditions in ScratchJr is a great way to teach kids about decision-making in programming! While ScratchJr is simpler than Scratch, you can still create conditions using clever combinations of blocks.
Although ScratchJr doesn’t have explicit condition blocks, it allows for the creation of interactive scenarios using event triggers, loops, and sprite behaviors. These tools help children understand how to make their projects respond to actions, inputs, or changes in the environment.
What Are Conditions?
Conditions allow programs to make decisions based on specific criteria. They allow a project to respond to events or situations, making it more interactive and dynamic. Let’s dive into how conditions work and explore their role in Scratch Jr.
Types of Conditional Triggers in Scratch Jr
- When Tapped Block:
- Starts a set of actions when a character or object is tapped.
- Example: A cat meows when you tap it

2. When Green Flag Block:
- Starts actions when the green flag is pressed to begin the program.
- Example: All characters on the stage start moving when the project begins.

3.When Bumped Block:
- Starts actions when one character collides (or “bumps”) into another.
- Example: A car stops moving when it hits a wall.

4.Wait Block:
- Delays actions until a specified time passes, adding a condition for timing.
- Example: A balloon floats after waiting for 3 seconds.

Example 1: A Rocket Launches on Tap
Objective: Launch a rocket into the sky when it is tapped.
- Add Characters:
- Add a rocket to the stage.
- Program the Rocket:
- Use a “when tapped” block to start the sequence.
- Add a “move up” block to make the rocket fly upward.
Result:
The rocket takes off only when tapped.

Example 2: A Fish Changes Direction When It Hits the Rock
Objective: Make a fish swim back and forth by changing direction when it hits the edge of the screen.
- Add a Fish Character:
- Add a fish sprite.
- Program the Fish:
- Use a “move forward” block to make the fish swim.
- Combine it with the “when bumped” block to reverse direction when the fish reaches the screen edge.
Result:
The fish swims continuously, changing direction upon hitting the rock.

Example 3: Frog jumps in pads
Objective: Make the frog jump across three pads, with pauses between each jump using the Wait Block.
- Add Characters:
- Add the frog sprite.
- Program the frog:
Script 1:
- Use the “when tapped” block to start the sequence.
- Use the “move right, wait and move up” blocks to make the frog reach the pads.
Script 2:
- Use the “when tapped” block to start the sequence.
- Use the “hop and wait ” block to make the frog jump and reach the pads with pauses.
Script 1 and Script 2 will run simultaneously.
Result:
The frog jumps across three pads, with pauses between each jump.

Key Takeaways
- Conditions make ScratchJr projects interactive by responding to events like tapping, bumping, or starting the program.
- You can combine conditions with loops, motions, and sounds to create engaging and dynamic animations.
- By using conditions, kids can understand the basics of if-then logic, a fundamental concept in programming.
Conditional communication:
In ScratchJr, we have a unique way for sprites to interact called conditional communication. This happens when one sprite sends a signal, and another sprite performs an action upon receiving that signal. It’s like a conversation where one sprite gives a cue, and the other responds, creating a dynamic exchange. This concept is closely related to conditions, as the receiving sprite acts only if the specific signal is passed to it. By using this feature, we can design coordinated movements, interactive stories, games, and complex animations that bring projects to life.
Conditional communication in ScratchJr is an exciting area to explore! It is a great way to introduce logic and interactivity.
It allows sprites to interact by sending and receiving messages. One sprite sends a message, and another sprite performs an action upon receiving it.
You’ll use the “Send Message” block and the “When I Receive” block for this.

Step-by-Step Guide
- Set Up Sprites
- Add multiple sprites to your project.
- Ensure they have a clear role (e.g., a character asking a question, another responding).
- Send a Message
- Attach a “Send Message” block to one sprite’s script.
- Choose a color-coded message (e.g., red, blue, or green).
- Example:
[Trigger/Motion block] → [Send Message (red)]
- Receive the Message
- Select another sprite and attach a “When I Receive Message (red)” block.
- Follow it with blocks that define what the sprite should do when it receives this message.
- Example:
[When I Receive Message (red)] → [Say “Hello!”]
- Adding Conditions
- Incorporate conditions into the logic:
- Use the “Wait” block to simulate delays.
- Sequence multiple messages to create branching effects.
- Incorporate conditions into the logic:
- Combine with Movement or Sound
- Add movement, sounds, or visual changes to make interactions dynamic.
- Example: A sprite moves to a location after receiving a message.
- Experiment with Nested Messages
- A sprite can send a second message in response to receiving the first, triggering a chain of events.
Example Activity: Quiz Game
Scenario: One sprite asks a question. Two sprites act as answer choices. Choosing the correct answer triggers a celebration.
- Sprite 1:
- Says, “What is 2 + 2?”
- Send Message (blue).
- Sprite 2 (Correct Answer):
- When receiving (blue), says “4,” then sends Message (green).
- Sprite 3 (Wrong Answer):
- When receiving (blue), says “5,” then sends Message (red).
- Celebratory Sprite:
- Receives (green) and plays a celebration sound.
- Receives (red) and shakes to show it’s incorrect.



Bringing It Together
By combining conditions and conditional communication, you can create projects where events depend on interactions or sequences. For instance, you can design:
- A story where characters take turns speaking.
- A game where players choose answers, and sprites respond based on their choices.
- A simulation where objects move or change when specific events occur.
These concepts make ScratchJr a powerful tool for introducing young learners to logical thinking and problem-solving.