Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » The Egg doesn't crack
- thelion5000
-
Scratcher
100+ posts
The Egg doesn't crack
i am making a catch the eggs game and sometimes the eggs don't crack, once the bug is fixed then it comes back and then it is fixed and now it is back. i shared my project so you can take a look at it, here's the link: https://scratch.mit.edu/projects/444597272 . Please reply early.
- semmiesem9
-
Scratcher
100+ posts
The Egg doesn't crack
The egg falling and egg cracking are two different scripts right now. I would recommend merging them together like this:
On another note, you are using the same script a lot with only minor changes each time. If you scroll down to “My Blocks” you can make your own block. Then you could make a block like this:
Then you can use it repeatedly like so:
repeat until <(score)<()>
change y by (-5)
if <(y position) < (-100)> then
play sound [glass breaking v]
change [score v] by (-1)
go to [random position v]
set y to (180)
switch costume to [egg-a v]
end
end
On another note, you are using the same script a lot with only minor changes each time. If you scroll down to “My Blocks” you can make your own block. Then you could make a block like this:
define until score is more than (goal) change y by (y) if fall then change score by (fall)
repeat until <(score)<(goal)>
change y by (y)
if <(y position) < (-100)> then
play sound [glass breaking v]
change [score v] by (fall)
go to [random position v]
set y to (180)
switch costume to [egg-a v]
end
end
Then you can use it repeatedly like so:
until score is more than (9) change y by (-5) if fall then change score by (-1)::custom
- thelion5000
-
Scratcher
100+ posts
The Egg doesn't crack
Thanks for the help, but will that make the eggs crack
Last edited by thelion5000 (Nov. 12, 2020 14:44:55)
- Discussion Forums
- » Help with Scripts
-
» The Egg doesn't crack