Sound block improvementWhen you do 1s1s, it's impossible to get a sound to play forever, like background music. I thought that there could be an 'if sound playing block', or something. This would let you sense if it's playing the music, then if it's not, play the music without that really annoying glitch.
when gf clicked forever if <not <sound playing>>
Offline
1s1s projects are all about overcoming this kind of stuff. I'd use the timer, knowing exactly how long is the song, maybe even down to miliseconds (the online player has a timer this precise), constantly checking whether the timer has passed this length in the game loop.
It is a bit hard to do this if you can't know when the sound isn't playing, though. Closest thing to this is the "loudness" block, with the audio input set to "Stereo Mix".
Offline
Actually, I made a pretty good script for this:
when gf clicked reset timer play sound [background music v]then, in the game play script:
if <(timer) > [length of song]> reset timer play sound [background music v] endI actually used this script in this game.http://scratch.mit.edu/projects/nitromian/2979324
Last edited by nitromian (2012-12-13 21:23:18)
Offline