Pages: 1
Topic closed
when i do this
the sound seems glitchy and sounds like this (kinda): "ththththththththththth"whenclicked
foreverplay soundWaterRunning ▼
Last edited by MathMaster101 (2012-01-27 21:39:06)
Offline
The problem is that you are using the play sound block. Each time through the loop it will start the sound at the beginning. What you wait is the "play sound until done" block.
Offline
demosthenes wrote:
The problem is that you are using the play sound block. Each time through the loop it will start the sound at the beginning. What you wait is the "play sound until done" block.
oh
Offline
try
whenclicked
foreverplay soundWaterRunning ▼until done
Offline
You need to put:
whenclicked
foreverplay soundWaterRunning ▼until done
Offline
The 'play sound' block actually starts a sound, but the script continues. So your script will keep restarting the sound before you can even hear it properly.
So the above suggestions work,or if you want a smoothly looping sound you could do something like this:
whenclicked
foreverplay soundWaterRunning ▼wait8.15secsadjust until you can't notice the pause anymore
Offline
You need "Play sound until done" Not just "Play sound" That should work.
Offline
The answer has been said many times, but I guess I will repeat it
Well, using the 'play sound' block just starts the sound while simultaneously continuing the rest of the script.
So what is happening now is that it is simultaneously running the forever loop and playing the sound which results in that "tththththth" noise- a snippet of the beginning of that sound.
The solution would be to use
instead of justplay soundWaterRunning ▼until done
because "play sound until done" is exactly what you need- it plays the sound until it finishes and THEN continues the script.play soundWaterRunning ▼
This allows the script to wait the length it takes to play the sound before starting over. However this method is rather time consuming and I guess "play sound until done" would be easier to do.whenclicked
foreverplay soundWaterRunning ▼wait5secs
Last edited by a1130 (2012-01-28 16:17:11)
Offline
You could do
then when you set the variable water running to 0 the sound will stop.whenclicked
forever ifwater running=1play soundwater running ▼until done
Offline
By using,
It will keeps restarting the sound. However, withwhenclicked
foreverplay soundWaterRunning
It will wait until the sound file has finished and THEN restart it.foreverplay soundWaterRunninguntil done
waits until the file is finished playing to move on in the script.play soundWaterRunninguntil done
Offline
I had this problem once. Try this:
when gf clicked
forever
play sound Whatever till done
Offline
mythbusteranimator wrote:
By using,
It will keeps restarting the sound. However, withwhenclicked
foreverplay soundWaterRunning
It will wait until the sound file has finished and THEN restart it.foreverplay soundWaterRunninguntil done
So basically,
waits until the file is finished playing to move on in the script.play soundWaterRunninguntil done
necropost
Offline
Topic closed
Pages: 1