Discuss Scratch

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:

repeatuntilscore<changeyby-5ifyposition<-100thenplaysoundglass breakingchangescoreby-1gotorandom positionsetyto180switchcostumetoegg-a

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:

defineuntilscoreismorethangoalchangeybyyiffallthenchangescorebyfallrepeatuntilscore<goalchangeybyyifyposition<-100thenplaysoundglass breakingchangescorebyfallgotorandom positionsetyto180switchcostumetoegg-a

Then you can use it repeatedly like so:

untilscoreismorethan9changeyby-5iffallthenchangescoreby-1
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)

thelion5000
Scratcher
100+ posts

The Egg doesn't crack

Never mind, thank you so much

Powered by DjangoBB