Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Different Level Difficulty Increases (or Decreases) Object Speed
- DensetsuNo
- New to Scratch
12 posts
Different Level Difficulty Increases (or Decreases) Object Speed
Hey Scratchers,
today I started my very first Scratch project (!!) and I am already stumbling on a, probably silly, problem.
Project page: Star Shooter
To cut it short the game includes 3 levels of difficulty where every level change implies an increase in movement speed for the falling stars across the screen.
The way I tried to solve it is the following:
I set up a variable called Star Speed, and set the value to 10, then I made every “Level Sprite” broadcast an announcement saying “Level Medium” or “Level Hard”, and then said “If (broadcast) = Level Medium” change speed by “5”. (Same with hard, just + 10).
But it is not working as I would have imagined, ie. the level selection doesn't have any effect on the star's speed. :-\
Help! :-)
today I started my very first Scratch project (!!) and I am already stumbling on a, probably silly, problem.
Project page: Star Shooter
To cut it short the game includes 3 levels of difficulty where every level change implies an increase in movement speed for the falling stars across the screen.
The way I tried to solve it is the following:
I set up a variable called Star Speed, and set the value to 10, then I made every “Level Sprite” broadcast an announcement saying “Level Medium” or “Level Hard”, and then said “If (broadcast) = Level Medium” change speed by “5”. (Same with hard, just + 10).
But it is not working as I would have imagined, ie. the level selection doesn't have any effect on the star's speed. :-\
Help! :-)
- deck26
- Scratcher
1000+ posts
Different Level Difficulty Increases (or Decreases) Object Speed
Can you identify which sprite or scripts we're looking for?
- hammer965
- Scratcher
100+ posts
Different Level Difficulty Increases (or Decreases) Object Speed
Have a look at my pong breakout game for some idea.
https://scratch.mit.edu/projects/141723626/#editor
I had a variable called level.
On the bat sprite I had a series of wait until level = commands so when the new level started I could change the ball speed, paddle speed or paddle size.
Not sure but perhaps your problem could be that broadcast start little start and broadcast level are happening together.
https://scratch.mit.edu/projects/141723626/#editor
I had a variable called level.
On the bat sprite I had a series of wait until level = commands so when the new level started I could change the ball speed, paddle speed or paddle size.
wait until <(level) = [3]>
change a variable
Not sure but perhaps your problem could be that broadcast start little start and broadcast level are happening together.
- DensetsuNo
- New to Scratch
12 posts
Different Level Difficulty Increases (or Decreases) Object Speed
Thanks, Hammer! At the end I managed to solve it, set two additional broadcasts and fixed it that way :-)
- Discussion Forums
- » Help with Scripts
- » Different Level Difficulty Increases (or Decreases) Object Speed