Discuss Scratch

Burrito997
New Scratcher
14 posts

Stopping one sound and starting another

So im trying to make a game in which when it starts the game it plays some music forever until it switches to a specific background. So like when it switches to the boss background it stops the music and plays a different sound, how can i do this?
LoudOrange2001
Scratcher
48 posts

Stopping one sound and starting another

after the block where it says change backdrop to…..
put play sound….. forever.

hope this helps
LoudOrange
Burrito997
New Scratcher
14 posts

Stopping one sound and starting another

but with doing that the previous sound is still playing
Burrito997
New Scratcher
14 posts

Stopping one sound and starting another

Bump
i really need this answered
PH-zero
Scratcher
100+ posts

Stopping one sound and starting another

just dont use a forever block, do it like this:
setrepeattotruerepeatuntilrepeat=falseplaysoundmyMusicuntildone
switchbackdroptosomeBackdropsetbooltofalsestopallsounds

This should work

Last edited by PH-zero (June 7, 2014 15:21:44)

Burrito997
New Scratcher
14 posts

Stopping one sound and starting another

shouldnt bool be repeat instead otherwise thanks so much
mathman314
Scratcher
100+ posts

Stopping one sound and starting another

Here's another alternative:
repeatuntilbackdropname=boss backdropplaysoundthat soundresettimerrepeatuntiltimer=lengthofthatsoundifbackdropname=boss backdropthenstopallsoundsplaysoundboss musicstopthis script
Use this to make yourself look smart!

Last edited by mathman314 (June 8, 2014 13:23:39)

juicykiwi
Scratcher
86 posts

Stopping one sound and starting another

whenclickedrepeatuntil<[(b(backdrop name)= [bosspplaysoundbefore bossuntildoneplaycratchblocks]playsound after bossvuntildone
Burrito997
New Scratcher
14 posts

Stopping one sound and starting another

thanks alot for all your help guys
Burrito997
New Scratcher
14 posts

Stopping one sound and starting another

Mathman i tried you way and i doesnt seem to be changing, i put the time in seconds (ex: a 2 minute and 11 second long song is 131) and dont know if that is messing up or i put the code in the wrong place ( i put it in my main sprite) please help
RPFluffy
Scratcher
1000+ posts

Stopping one sound and starting another

Try this, it is quite easy and a great way to getting into more complex things:

repeatuntilbackdropname=BackdropnameplaysoundMusicuntildoneplaysoundOtherMusicuntildone
plopdop1
Scratcher
6 posts

Stopping one sound and starting another

you could just use the play sound that doesn't say until finished and then wait however long you want it to be
whenclicked
playsound
wait...secs

Last edited by plopdop1 (June 9, 2014 01:01:24)

Burrito997
New Scratcher
14 posts

Stopping one sound and starting another

the problem with the scripts you are giving me is that when i get to the boss and the background changes and the main music is still playing it keeps playing until done. Then it starts the boss music, i want it to fade out and then the boss music to start instantly.
digthebone
Scratcher
500+ posts

Stopping one sound and starting another

whenclickedplaysoundradom songwaitasmuchsecondsasyouwantsecsstopallsoundsplaysoundanother random song

hopefully that helped
and always remember
whenclickedforeverifgothelpfromdigthebonethenknowheisawesome

digthebone's logo shop
Leonitis
Scratcher
11 posts

Stopping one sound and starting another

Here is the best and most effective way to do it! It is also very simple! Here it is:
whenbackdropswitchestoforeverifbackdropname= thenplaysounduntildone
Leonitis
Scratcher
11 posts

Stopping one sound and starting another

Sorry! Put
repeatuntil

Instead of
ifthen
MinecraftButterfly
Scratcher
7 posts

Stopping one sound and starting another

You Can Do THIS:

When Flag Clicked
Set {VARIABLE} To 0
Repeat Until {VARIABLE = 1
Play Sound {ANY} Until Done


When This Sprite Clicked
Broadcast {MESSAGE}

When I Recive {MESSAGE}
Set {VARIABLE} to 1
Forever
Play Sound {ANY} Until Done

THIS Is probably the most effective way!

Last edited by MinecraftButterfly (May 11, 2016 11:27:35)

Powered by DjangoBB