Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / How do we make sound during sprite animation?

Author
Message
Gamer
21
Years of Service
User Offline
Joined: 29th Apr 2003
Location:
Posted: 9th May 2003 11:24
When a sprite is moving lets say from left to right, how do we make the sound to do the same? It doesn't work when I have 'PLAY SOUND' (and SET SOUND PAN) within the loop - I hear no sound. The only time I can hear the sound is by placing it outside of (either before or after) the animation loop. Can anybody help?
Danmatsuma
21
Years of Service
User Offline
Joined: 2nd Mar 2003
Location: Australia
Posted: 9th May 2003 11:44
You need to trigger the sound only once within your loop, and only if it's not playing already. use something like



Or maybe you're better off using loop sound if it's to be constant.

Also it might be simpler (and sound cooler) to use a 3d sound for something like that, and position it at the same location as your sprite object (not sure how you're doing your sprite though)

Also If you'd posted your problem code I wouldn't be wasting my time guessing all this, it'd be fixed right now

ZX Spectrum 48k Issue 3, Radio shack Tape drive, Rank arena 12" T.V. set.
Gamer
21
Years of Service
User Offline
Joined: 29th Apr 2003
Location:
Posted: 9th May 2003 21:02
Thanks. I didn't have the sound checking.

Login to post a reply

Server time is: 2024-09-20 07:23:49
Your offset time is: 2024-09-20 07:23:49