Trying to make my music play as my game opens.
by Brad · in Technical Issues · 09/02/2007 (5:19 pm) · 6 replies
Hello all, i am a nooby beginner and well basically my question is, how can i get my wav file to play as my game loads up, without having to click a button, just to play as the game is initiated.
Now i have made a audio data block script and my wav file is linked, i can open up my game type in this command
alxPlay(backgroundAudio);
and my looped audio begins to play, thats great, i just need to know how this file will play without having to type any command into console.
Sorry for being a nooby face plop.
thanks.
Now i have made a audio data block script and my wav file is linked, i can open up my game type in this command
alxPlay(backgroundAudio);
and my looped audio begins to play, thats great, i just need to know how this file will play without having to type any command into console.
Sorry for being a nooby face plop.
thanks.
#2
But if you know how to stop the audio when i close the game that would be great!
peace man.
just noticed this forum isnt so active huh.. :p
09/05/2007 (6:10 pm)
Hey your from toronto, i had a 2 week holiday there only a few weeks ago! and niagra falls, was good, anyway i just pasted that line into my audio.cs and it plays on its own, the only problem is i dont know how to get it to stop when i close my game, but i made a respawn point for my ball (doing a football game) so as long as you dont close and re open the game so the audio overlays then its fine.But if you know how to stop the audio when i close the game that would be great!
peace man.
just noticed this forum isnt so active huh.. :p
#3
Im of to bed right now otherwise I would go routng for you.
As for forum activity. Well the most recent posts show up on the main page anyway so that doesnt matter to much.
09/05/2007 (7:03 pm)
Yeah.. its doable.. just cant remember how right now.. I did it meself before.Im of to bed right now otherwise I would go routng for you.
As for forum activity. Well the most recent posts show up on the main page anyway so that doesnt matter to much.
#4
Something like: alxStop(backgroundAudio);
09/05/2007 (7:09 pm)
AlxStop is what you are looking for. Put it where you want to stop the sound. Something like: alxStop(backgroundAudio);
#5
http://tdn.garagegames.com/wiki/Audio/Music
09/05/2007 (7:51 pm)
You might want to look at this doc.http://tdn.garagegames.com/wiki/Audio/Music
#6
i will check out that link an dsee if that helps.
Thanks a lot.
09/06/2007 (6:48 am)
I did try to add the alxStop line in a few places but it would just stop the music as i opened the game, almost like the start and stop commands where just countering each other...i will check out that link an dsee if that helps.
Thanks a lot.
Torque Owner Nikos Beck
It's ok if your a noob face plop. You at least write proper sentences and you asked politely.