Discuss Scratch

Broken_crayon
Scratcher
27 posts

Music Overlapping

I've been working on this platformer, and the music keeps overlapping each other when you reach a boss fight.

Here's the code below

when I receive [ Start]
forever
if <not <(Level) = [3]>> then
play sound [ Can You Really Call This a Hotel, I Didn’t Receive a Mint on My Pillow or Anything v] until done
end

I have no idea how to fix it

Oh, also when ever I tap the script while it has the yellow outline it stops the script… Is that normal????

Last edited by Broken_crayon (Feb. 10, 2024 05:54:45)

Cool_Dude2022
Scratcher
500+ posts

Music Overlapping

Broken_crayon wrote:

I've been working on this platformer, and the music keeps overlapping each other when you reach a boss fight.

Here's the code below

when I receive [ Start]
forever
if <not <(Level) = [3]>> then
play sound [ Can You Really Call This a Hotel, I Didn’t Receive a Mint on My Pillow or Anything v] until done
end

I have no idea how to fix it

Do you mind sharing the game so that I can see what is going on? It shouldn't be repeating due to the fact that you have “until done,” the only thing that I can think of is because it is in a forever loop. This could also occur if you are broadcasting “start” more than once.

Broken_crayon wrote:

Oh, also when ever I tap the script while it has the yellow outline it stops the script… Is that normal????

Yes, that is normal. When a script is running, it has a yellow glow around it, you have the ability to stop it by clicking the script.

Last edited by Cool_Dude2022 (Feb. 10, 2024 06:02:19)

Broken_crayon
Scratcher
27 posts

Music Overlapping

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

Last edited by Broken_crayon (Feb. 10, 2024 06:06:12)

Broken_crayon
Scratcher
27 posts

Music Overlapping

Cool_Dude2022 wrote:

Broken_crayon wrote:

I've been working on this platformer, and the music keeps overlapping each other when you reach a boss fight.

Here's the code below

when I receive [ Start]
forever
if <not <(Level) = [3]>> then
play sound [ Can You Really Call This a Hotel, I Didn’t Receive a Mint on My Pillow or Anything v] until done
end

I have no idea how to fix it

Do you mind sharing the game so that I can see what is going on? It shouldn't be repeating due to the fact that you have “until done,” the only thing that I can think of is because it is in a forever loop. This could also occur if you are broadcasting “start” more than once.

Broken_crayon wrote:

Oh, also when ever I tap the script while it has the yellow outline it stops the script… Is that normal????

Yes, that is normal. When a script is running, it has a yellow glow around it, you have the ability to stop it by clicking the script.

https://scratch.mit.edu/projects/962363475/
Cool_Dude2022
Scratcher
500+ posts

Music Overlapping

Broken_crayon wrote:

Cool_Dude2022 wrote:

Broken_crayon wrote:

I've been working on this platformer, and the music keeps overlapping each other when you reach a boss fight.

Here's the code below

when I receive [ Start]
forever
if <not <(Level) = [3]>> then
play sound [ Can You Really Call This a Hotel, I Didn’t Receive a Mint on My Pillow or Anything v] until done
end

I have no idea how to fix it

Do you mind sharing the game so that I can see what is going on? It shouldn't be repeating due to the fact that you have “until done,” the only thing that I can think of is because it is in a forever loop. This could also occur if you are broadcasting “start” more than once.

Broken_crayon wrote:

Oh, also when ever I tap the script while it has the yellow outline it stops the script… Is that normal????

Yes, that is normal. When a script is running, it has a yellow glow around it, you have the ability to stop it by clicking the script.

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

In the “Backdrops,” put this code:

when I receive [start v]
forever
if <(level) = [3]> then

else
stop all sounds
play sound [can you really call this a hotel v] until done
end
end

And then in the “NPC Fight” sprite put this code:

when green flag clicked
hide
forever
wait until <(level) = [3]>
stop all sounds
play sound [fight! v] until done
end
Broken_crayon
Scratcher
27 posts

Music Overlapping

Cool_Dude2022 wrote:

Broken_crayon wrote:

Cool_Dude2022 wrote:

Broken_crayon wrote:

I've been working on this platformer, and the music keeps overlapping each other when you reach a boss fight.

Here's the code below

when I receive [ Start]
forever
if <not <(Level) = [3]>> then
play sound [ Can You Really Call This a Hotel, I Didn’t Receive a Mint on My Pillow or Anything v] until done
end

I have no idea how to fix it

Do you mind sharing the game so that I can see what is going on? It shouldn't be repeating due to the fact that you have “until done,” the only thing that I can think of is because it is in a forever loop. This could also occur if you are broadcasting “start” more than once.

Broken_crayon wrote:

Oh, also when ever I tap the script while it has the yellow outline it stops the script… Is that normal????

Yes, that is normal. When a script is running, it has a yellow glow around it, you have the ability to stop it by clicking the script.

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

In the “Backdrops,” put this code:

when I receive [start v]
forever
if <(level) = [3]> then

else
stop all sounds
play sound [can you really call this a hotel v] until done
end
end

And then in the “NPC Fight” sprite put this code:

when green flag clicked
hide
forever
wait until <(level) = [3]>
stop all sounds
play sound [fight! v] until done
end
Thank you so much!
KuunanTheConehead
Scratcher
92 posts

Music Overlapping

You can use volume settings with different music sprites

Powered by DjangoBB