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 / Dodging Game (Loop sound problem)

Author
Message
1beginner1
15
Years of Service
User Offline
Joined: 28th Jun 2009
Location: Belgium
Posted: 15th Sep 2010 19:33 Edited at: 15th Sep 2010 19:35
Hello everyone

I used the tutorial code of Zaibatsu http://forum.thegamecreators.com/?m=forum_view&t=153346&b=7and added a few extra functions (restart when you lose, pause and sound)
The sound is looping but when I pause the game it pause the sounds like I want it. But when I unpause the game it will resume it but it will stop looping it and I want to resume the sound where it has stopped and still keeping it looping

A second problem the happens is that after a while when running the game I get lag and my CPU usage will raise.

IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 15th Sep 2010 22:43
That's a bug - could you report it in the bug forum?

I'm not sure how well it will work, but you could check to see if the sound is still playing (SOUND PLAYING), and if not, use LOOP SOUND to restart it.

In the worst case, just stop the sound when pausing and start it with LOOP SOUND when unpausing - people aren't likely to worry too much about it when playing.

Utility plug-ins (26-JUL-2010)
I'm applying terms of use that require you to wear a red nose and honk a horn whenever you use the Internet
1beginner1
15
Years of Service
User Offline
Joined: 28th Jun 2009
Location: Belgium
Posted: 16th Sep 2010 19:47 Edited at: 16th Sep 2010 19:58
Ok your first solution didn't work
I then added this to my code

The pause worked well and looping never changed and kept standing on 1 so that it was indeed looping. But the sound stopped playing when the sound ended. If I press the pause button again and unpause it will restart playing the song but still no loop

Your second solution works fine

I reported it at the bug section
thnx

Login to post a reply

Server time is: 2024-11-24 10:26:22
Your offset time is: 2024-11-24 10:26:22