Skip to lesson
LESSON 38 / 44 · Beginner

Add music and sound effects

Import audio and trigger it at useful moments.

Open editor in a new tab ↗

Before you begin

Use audio you created or have permission to include in a shared game.

Build it step by step

  1. Open Sounds and choose Upload / import sound. Give each file a useful name such as Coin chime or Garden music.

  2. Preview the imported sound before adding a rule. Keep clips appropriately sized for downloads and mobile devices.

  3. Add SOUND → Play sound to a once-only event or contact rule. Choose the imported sound and the available playback settings.

  4. Use Stop sound when the scene or story should end that sound. Avoid starting background music from a WHILE condition every frame.

  5. Press Play and interact with the game first. Test on a real phone as well as desktop, checking volume and unwanted overlapping playback.

TRY THIS IDEA

Practical example

Collecting a coin plays one short chime; a conversation uses a separate recorded voice clip.

Test your work

Each event plays the intended audio once and restart does not stack repeated music.

If it does not work

Browsers may block audio until interaction. Also check mute settings, the chosen sound and whether the trigger actually fires.

MAKE IT YOUR OWN

Student challenge

Use distinct quiet sounds for success and damage, with visuals that still explain both events when muted.

Show the result to a partner. Explain what you changed and how you tested it.

Keep exploring