ScratchData LogoScratchData
Back to cleversquid47's profile

Help With Code 1

CLcleversquid47•Created March 5, 2022
Help With Code 1
0
0
6 views
View on Scratch

Instructions

Hello, @Rand0mGuy4! I tried fixing your scratch project. The technique here is to use a variable that detects if the square is broken or not. So when the green flag is clicked, we set the "is square broken?" variable to no. Then, when it takes damage from the black text, we set that variable to yes. Now, when the left key is pressed for example, the scratch program checks if the square is broken. If it's not, then it will continue the movement code. If it is, nothing will happen. That's how you make the square not move when it's broken. I also cleaned your code a little bit by creating another "my block" that checks if it's touching anything. So after moving with any key, it will trigger the my block. I just did this so your code will be shorter and look more clean.

Description

@Rand0mGuy4 for the Scratch Project.

Project Details

Project ID654678112
CreatedMarch 5, 2022
Last ModifiedMarch 12, 2022
SharedMarch 5, 2022
Visibilityvisible
CommentsAllowed

Remix Information

Parent ProjectView Parent
Root ProjectView Root