0

I am pretty new to Scratch so please pardon my naive code.

This is my project for problem set 0. Princess

What should be happening is that when the dragon sprite touches the princess sprite, the sound event should be fired but that doesn't occur.

I tried using the approach used in the Pikachu game but to no avail.

Any advice?

0

The problem is that the dragon touches the princess while it is gliding. So control never leaves the else block until the dragon finishes gliding. I'm not sure if this is the best solution, but I suggest using other motion puzzle pieces (e.g., move, turn, go to, etc.) with loops and conditions as needed and having your if block that checks whether the dragon touches the princess right after your motion puzzle pieces.

Here is an example on the general idea

turn x degrees

repeat
{
    move y steps
    if touches princess
    {
        play the sound
        // do something else
    }

    if reached a certain point
    {
        update x [and optionally y]
        turn x degrees  
    }
}

Hope that helps!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .