Discuss Scratch

farestrabs
New Scratcher
4 posts

Bug and a question

1. I have a bug in my project where I can no longer rotate my sprite. I have written the right code for it as it had worked before. Could someone please take a look at the code for “sports car” in my project and tell me what I have done wrong?

2. I am trying to make it so that when the “sports car” hits the finish line first, both cars return to their original position, and the same thing for the “lowrider” but I don't know how to because there is no like double “if” piece.

here is the code to my project
https://scratch.mit.edu/projects/902033263
Zydrolic
Scratcher
1000+ posts

Bug and a question

farestrabs wrote:

(#1)
1. I have a bug in my project where I can no longer rotate my sprite. I have written the right code for it as it had worked before. Could someone please take a look at the code for “sports car” in my project and tell me what I have done wrong?
Haven't loaded into the editor (yet), however you might wanna check rotation style, the “m” and “n” hotkeys in the code worked.
2. I am trying to make it so that when the “sports car” hits the finish line first, both cars return to their original position, and the same thing for the “lowrider” but I don't know how to because there is no like double “if” piece.
Create a broadcast and put it in the “Score” custom block's “if <> then” statement, then recreate this line of code in it (edit: lowrider):

Last edited by Zydrolic (Oct. 5, 2023 19:26:58)

farestrabs
New Scratcher
4 posts

Bug and a question

i * love u bro
Zydrolic
Scratcher
1000+ posts

Bug and a question

farestrabs wrote:

(#3)
i * love u bro
uh np ig
also forgot to mention but just add
set rotation style [all around v]
into the first line of code in sports car:
farestrabs
New Scratcher
4 posts

Bug and a question

could you also help me out on how to make the game finish after scoring 5 points?
farestrabs
New Scratcher
4 posts

Bug and a question

and what exactly is a broadcast? ( I'm very new to this)
kiwilover2736
Scratcher
1000+ posts

Bug and a question

Broadcast blocks can be used to basically send a message to other sprites. Here's an example:

when green flag clicked
wait (5) secs
broadcast [Go to random position]
↑ This script is in the 1st sprite. The script waits 5 seconds when the project starts and then broadcasts a message.

when I receive [Go to random position]
go to [random position]
↑ This script is in the 2nd sprite. It waits until the 1st sprite broadcasts the message using the "Broadcast " block and then goes to a random position.

Powered by DjangoBB