ScratchData LogoScratchData
Back to MrQuentin's profile

Getting Unstuck 2020 Day 3

MRMrQuentin•Created July 3, 2020
Getting Unstuck 2020 Day 3
28
7
87 views
View on Scratch

Instructions

Just click the green flag.

Description

This project presented more of a challenge than I thought it would. The red circle sits in the center and changes color every second. The black circle bounces around the stage drawing a line using the pen extension. I wanted the pen color to change to the current color of the center circle every time the black circle touched it. My first discovery was that the pen blocks and the looks blocks use a different scale for colors. The pen blocks go from 0-100 while the looks "color effect" blocks go from 0-200. To get the colors to match I used a variable for color. In the "set pen color to..." block I used an operator to divide the color effect color by 2 to get the pen color. My next challenge was that the pen color didn't always change when the 2 sprites touched. I initially had the script that changed the pen color in its own "if... then" statement nested in a "forever". After trying adjusted waits and speeds on the 2 sprites, I tried putting the if statement in the same forever loop that moves the black circle. That worked. I am not sure why it worked, but it did. I used the music extension to add a little background ambiance. I set up a 3 note sequence to play when the 2 sprites touch. Each "play note..." block has a range of 3 notes to choose from and a range of beats to play for. That way each time through the loop the note sequence is a little different.

Project Details

Project ID409462134
CreatedJuly 3, 2020
Last ModifiedMay 9, 2022
SharedJuly 8, 2020
Visibilityvisible
CommentsAllowed