Worked on the sound today. I found out that it was right, and i just needed to plug in headphones to hear it. I used the code from the 142 resources page and found that I didn't need the song.close() part as I just want my sound to play when a collision is detected. I put ding.play() into the collision part and saw that it was continuously playing that one ding sound when they collided. So I figured I'd have to put in ding.rewind() so that it would rewind then play the sound again each time. But now I noticed that it was playing two ding sounds as it hit. I was puzzled by this but then figured out that each box was playing its own ding sound which sounded like two in consequence because I have code for each of the two that collide. Thinking that was done, I played it again and now the boxes seemed to stick to each other when they collided and repeated this awful part of the ding sound. Hmm...
So, so far I have 5 boxes that collide (if unnaturally) with each other and bounce off the sides. It seems a little bland to me...
No comments:
Post a Comment