This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2012-10-24 07:27:49

prokohtu
Scratcher
Registered: 2008-06-19
Posts: 100+

play sound until

hey guys is it possible in some way to make a

play sound[sound1 v] until<something happens>
so the sound is long and starts playing, but without repeating itself??
thanks for your help


Scratch's most realistic F1 simulator
https://lh6.googleusercontent.com/-qIdF-SzbTzw/UU29tK-FYvI/AAAAAAAAAOs/vRFKr1Iwldc/s225/logo.jpg

Offline

 

#2 2012-10-24 07:29:15

Gravitation
New Scratcher
Registered: 2012-09-26
Posts: 500+

Re: play sound until

It's not possible because the program can never know in which amount of time the boolean will become true.  hmm

Offline

 

#3 2012-10-24 08:00:59

Prestige
Scratcher
Registered: 2008-12-15
Posts: 100+

Re: play sound until

You can stop all sounds when something happens, change a variable and resume sounds that correspond to the new variable value  smile


"Don't insult someone until you've walked a mile in their shoes. That way, if they don't like what you have to say, you'll be a mile away and still have their shoes  smile  "

Offline

 

#4 2012-10-24 08:20:49

prokohtu
Scratcher
Registered: 2008-06-19
Posts: 100+

Re: play sound until

Gravitation wrote:

It's not possible because the program can never know in which amount of time the boolean will become true.  hmm

i mean it starts playing the sound and stops it when something happens


Scratch's most realistic F1 simulator
https://lh6.googleusercontent.com/-qIdF-SzbTzw/UU29tK-FYvI/AAAAAAAAAOs/vRFKr1Iwldc/s225/logo.jpg

Offline

 

#5 2012-10-24 08:23:07

Gravitation
New Scratcher
Registered: 2012-09-26
Posts: 500+

Re: play sound until

prokohtu wrote:

Gravitation wrote:

It's not possible because the program can never know in which amount of time the boolean will become true.  hmm

i mean it starts playing the sound and stops it when something happens

Then do what Prestige said. Here, in script form:

when gf clicked
play sound [sound v]
wait until <>
stop all sounds

Offline

 

Board footer