Computer Science Canada Need help with Game music |
| Author: | Badsniper [ Sun Jun 05, 2011 3:48 pm ] | ||
| Post subject: | Need help with Game music | ||
What is it you are trying to achieve? I am trying to make my game change the music it plays depending on the level you are on. And it has to keep playing that same song as long as you stay on the same level. What is the problem you are having? My program will play the correct level song, but it won't loop that song, it actually goes to a different process and plays that song. Describe what you have tried to solve this problem I've put loops in and out of the process, and I've tried moving the Music.PlayFileStop, but to no avail. Post any relevant code (You may choose to attach the file instead of posting the code if it is too long) Please note, This code won;t work without all of the include files and stuff, so don't try running it.
Please specify what version of Turing you are using 4.1.1 |
|||
| Author: | Raknarg [ Sun Jun 05, 2011 3:59 pm ] |
| Post subject: | RE:Need help with Game music |
Why are you using processes for it, out of curiosity? |
|
| Author: | Badsniper [ Sun Jun 05, 2011 4:32 pm ] |
| Post subject: | Re: Need help with Game music |
Because that's the only way I know how to get music to play in the background while running the game... |
|
| Author: | Raknarg [ Sun Jun 05, 2011 4:37 pm ] | ||
| Post subject: | RE:Need help with Game music | ||
Why don't you try:
|
|||
| Author: | Badsniper [ Sun Jun 05, 2011 5:07 pm ] | ||
| Post subject: | Re: Need help with Game music | ||
Well, that sort of helped. My code now looks like this:
When I run my custom levels, the process (CUSTOM_MUSIC) works fine, and so does the MENU_MUSIC. However, the MUSIC process doesn't play songs anymore... I have checked what level equals, and it equals 1. So it should play the same song as the the Custom Music process... but it's not... |
|||
| Author: | Raknarg [ Sun Jun 05, 2011 5:31 pm ] |
| Post subject: | RE:Need help with Game music |
I meant that so that you don't need processes at all. In fact, you could do the exact same thing that way, just without processes. If I were you, I would use a string variable for the name and just change that whenever I changed the music. If you dont want to try it, then I can't really help you beyond that. |
|
| Author: | Badsniper [ Sun Jun 05, 2011 5:44 pm ] |
| Post subject: | Re: Need help with Game music |
Thank you for the No-Processes suggestion. Everything works now. THANKS! |
|