Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » In game, when I reach level 2, when I restart the game it plays level 2 sounds.
- PeteyPantoo
-
New Scratcher
4 posts
In game, when I reach level 2, when I restart the game it plays level 2 sounds.
Basically, what the title says. The game won't reset if I hit the stop button. When I hit the stop button and re click the green flag, it will start on with the level 2 sounds. Everything else will be working as normal. I can't see anything in the code that would cause this that I know of. But if I reset it after that initial retry, it will work normal again.
- colinmacc
-
Scratcher
1000+ posts
In game, when I reach level 2, when I restart the game it plays level 2 sounds.
You probably need to initialise what ever variable controls the sounds under a green flag block
- PeteyPantoo
-
New Scratcher
4 posts
In game, when I reach level 2, when I restart the game it plays level 2 sounds.
- colinmacc
-
Scratcher
1000+ posts
In game, when I reach level 2, when I restart the game it plays level 2 sounds.
Looking at the code, it's probably your “Score” variable.
You have three receivers of the “New game” message, the one with the wait in to change the music I think will execute and change the music before the score is reset from the last game.
You probably want to change that receiver to a different message that you broadcast just prior to starting your forever loop.
You have three receivers of the “New game” message, the one with the wait in to change the music I think will execute and change the music before the score is reset from the last game.
You probably want to change that receiver to a different message that you broadcast just prior to starting your forever loop.
- Saiid
-
Scratcher
1000+ posts
In game, when I reach level 2, when I restart the game it plays level 2 sounds.
I'll take a look.
- Saiid
-
Scratcher
1000+ posts
In game, when I reach level 2, when I restart the game it plays level 2 sounds.
- EvanTheEevee543
-
Scratcher
75 posts
In game, when I reach level 2, when I restart the game it plays level 2 sounds.
This may be because you are playing level 2 sounds before reloading and setting the level variable, thus causing the game to play the sound then change the variable
- Saiid
-
Scratcher
1000+ posts
In game, when I reach level 2, when I restart the game it plays level 2 sounds.
This may be because you are playing level 2 sounds before reloading and setting the level variable, thus causing the game to play the sound then change the variable^ They’re correct. Fixed in my remix
- Discussion Forums
- » Help with Scripts
-
» In game, when I reach level 2, when I restart the game it plays level 2 sounds.