Discuss Scratch

KlonanoRook
Scratcher
100+ posts

[resolved] Possible technical error/sound error

https://scratch.mit.edu/projects/164565556/

Start up the game. Run into a wall continuously until you die. For some reason, I have music set up to play, but it doesn't until I go in the editor and renive the code block that is registered to play the sound. Is this just a problem on my end or soemthing?

Last edited by KlonanoRook (June 5, 2017 03:13:52)

Shatterfrost
Scratcher
100+ posts

[resolved] Possible technical error/sound error

Which sprite is the song in?
footsocktoe
Scratcher
1000+ posts

[resolved] Possible technical error/sound error

KlonanoRook wrote:

https://scratch.mit.edu/projects/164565556/

Start up the game. Run into a wall continuously until you die. For some reason, I have music set up to play, but it doesn't until I go in the editor and renive the code block that is registered to play the sound. Is this just a problem on my end or soemthing?

It's because you have the broadcast in a forever loop. Simple quick solution. After you make the broadcast and hide HP, set HP to -1. That will stop the repeating broadcast.

A little more elegant would be to use “broadcast and wait” instead of “broadcast”.

Last edited by footsocktoe (June 5, 2017 02:53:18)

KlonanoRook
Scratcher
100+ posts

[resolved] Possible technical error/sound error

Shatterfrost wrote:

Which sprite is the song in?

Capboy.
KlonanoRook
Scratcher
100+ posts

[resolved] Possible technical error/sound error

footsocktoe wrote:

KlonanoRook wrote:

https://scratch.mit.edu/projects/164565556/

Start up the game. Run into a wall continuously until you die. For some reason, I have music set up to play, but it doesn't until I go in the editor and renive the code block that is registered to play the sound. Is this just a problem on my end or soemthing?

It's because you have the broadcast in a forever loop. Simple quick solution. After you make the broadcast and hide HP, set HP to -1. That will stop the repeating broadcast.

A little more elegant would be to use “broadcast and wait” instead of “broadcast”.

okay thank

Powered by DjangoBB