Pages: 1
Topic closed
when i do this
when gf clicked forever play sound [WaterRunning v] endthe sound seems glitchy and sounds like this (kinda): "ththththththththththth"
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
when gf clicked forever play sound [WaterRunning v] until done end
Offline
You need to put:
when gf clicked forever play sound [WaterRunning v] until done end
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:
when green flag clicked forever play sound [WaterRunning v] wait (8.15) secs //adjust until you can't notice the pause anymore end
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
play sound [WaterRunning v] until doneinstead of just
play sound [WaterRunning v]because "play sound until done" is exactly what you need- it plays the sound until it finishes and THEN continues the script.
when gf clicked forever play sound [WaterRunning v] wait (5) secs endThis 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.
Last edited by a1130 (2012-01-28 16:17:11)
Offline
You could do
when green flag clicked forever if <(water running)=(1)> play sound [water running v] until done endthen when you set the variable water running to 0 the sound will stop.
Offline
By using,
when gf clicked forever play sound [WaterRunning]It will keeps restarting the sound. However, with
forever play sound [WaterRunning] until doneIt will wait until the sound file has finished and THEN restart it.
play sound [WaterRunning] until donewaits until the file is finished playing to move on in the script.
Offline
I had this problem once. Try this:
when gf clicked
forever
play sound Whatever till done
Offline
mythbusteranimator wrote:
By using,
when gf clicked forever play sound [WaterRunning]It will keeps restarting the sound. However, with
forever play sound [WaterRunning] until doneIt will wait until the sound file has finished and THEN restart it.
So basically,
play sound [WaterRunning] until donewaits until the file is finished playing to move on in the script.
necropost
Offline
Topic closed
Pages: 1