Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » why does this not work
- Old-man96
- Scratcher
4 posts
why does this not work
im trying to make some music for my game but its not working. im trying to make music for the menu but it wont stop playing
Btw i have tried using
when green flag clicked
repeat until <(Game on) = [Y]>
play sound [ quirky-music-cartoon-154978] until done
end
stop all sounds
stop [ This script]
Btw i have tried using
play sound [ quirky-music-cartoon-154978]but it just plays the sound repeatedly
Last edited by Old-man96 (March 25, 2024 20:18:48)
- 96498cb
- Scratcher
100+ posts
why does this not work
Maybe try changing the play sound until done to play sound?
highlight (double click) a piece of text + control (command on mac) + shift + down arrow key to see my full siggy.
define 96498cbCome to this link for awesome code, employees, and service!
forever
help forums :: custom
end
100th post!!!!!!!!! https://scratch.mit.edu/discuss/topic/706823/?page=185#post-7670932
This is Mira. She is my siggy protector.
(= ^ •⩊• ^ = :: #aaaaaa)Hey, I am a small creator that doesn't have a lot of projects, but i would appreciate if you liked and faved them. (you don't have to)
- TheRealRldFan
- Scratcher
36 posts
why does this not work
Nevermind
Last edited by TheRealRldFan (March 25, 2024 20:01:48)
- 96498cb
- Scratcher
100+ posts
why does this not work
not y, he means yes, like a y or n in oregon trail your ment to do:when green flag clicked
repeat until <(Your variable here) = (y position)>
play sound [Music here] until done
end
stop all sounds
stop [this script]
highlight (double click) a piece of text + control (command on mac) + shift + down arrow key to see my full siggy.
define 96498cbCome to this link for awesome code, employees, and service!
forever
help forums :: custom
end
100th post!!!!!!!!! https://scratch.mit.edu/discuss/topic/706823/?page=185#post-7670932
This is Mira. She is my siggy protector.
(= ^ •⩊• ^ = :: #aaaaaa)Hey, I am a small creator that doesn't have a lot of projects, but i would appreciate if you liked and faved them. (you don't have to)
- TheRealRldFan
- Scratcher
36 posts
why does this not work
ohnot y, he means yes, like a y or n in oregon trail your ment to do:when green flag clicked
repeat until <(Your variable here) = (y position)>
play sound [Music here] until done
end
stop all sounds
stop [this script]
- MrKingofScratch
- Scratcher
100+ posts
why does this not work
The problem with this is that the full song has to be played, then the script checks if the game started for like a frame, and then it plays the whole song again before checking if the game started again. You can fix this by seperating the script into two seperate chunks:
when green flag clickedLet me know if this doesn't work- I hope it helped!
repeat until <(gameon?) = [y]>
play sound [music v] until done
end
when green flag clicked
wait until <(gameon?) = [y]>
stop all sounds
- Old-man96
- Scratcher
4 posts
why does this not work
Thank you so much it did work I finally can finish my game!! The problem with this is that the full song has to be played, then the script checks if the game started for like a frame, and then it plays the whole song again before checking if the game started again. You can fix this by seperating the script into two seperate chunks:when green flag clickedLet me know if this doesn't work- I hope it helped!
repeat until <(gameon?) = [y]>
play sound [music v] until done
end
when green flag clicked
wait until <(gameon?) = [y]>
stop all sounds
- MrKingofScratch
- Scratcher
100+ posts
why does this not work
Np! Let me know when it comes out! Thank you so much it did work I finally can finish my game!!
- Old-man96
- Scratcher
4 posts
why does this not work
it hasNp! Let me know when it comes out! Thank you so much it did work I finally can finish my game!!
https://scratch.mit.edu/projects/946712311
- Discussion Forums
- » Help with Scripts
- » why does this not work