Olafo Posted April 10, 2011 Share Posted April 10, 2011 Hi. I've created an interior, but i'm having problems in adding music to it. Even if i add the default musics of the game to that interior, it doesn't sound in game. Can somebody teach me how to do this? Link to comment Share on other sites More sharing options...
angelwraith Posted April 10, 2011 Share Posted April 10, 2011 (edited) ambient sounds use playsound. locational sounds use playsound3d if you mess this part up it wont work in game. however, to get out of this; easiest way to deal with sounds in my experience is to actually add them as references in the game.that way you dont have to code them thus closing opportunities for them to not work as expected. remember if you need the reference to be enabled to play to set the reference to disabled on start and if you need control over whether or not they're playing use enable and disable to control the reference.. still really simple code. and no worrying about how to stop a looping sound ;) Edited April 10, 2011 by angelwraith Link to comment Share on other sites More sharing options...
Olafo Posted April 10, 2011 Author Share Posted April 10, 2011 What do yo mean with "add them as references in the game"? How can i do that? Link to comment Share on other sites More sharing options...
angelwraith Posted April 10, 2011 Share Posted April 10, 2011 What do yo mean with "add them as references in the game"? How can i do that? drag the audio from the object window to the render window. the sound will show up in the render as a green speaker but you wont be able to see it in game. double click the green speaker once in the render window to edit its reference info. Link to comment Share on other sites More sharing options...
cambragol Posted April 10, 2011 Share Posted April 10, 2011 Refer to this link: Adding MusicIt has the complete answer to how to add music to the game. At least for the type you are looking to add, I believe. Link to comment Share on other sites More sharing options...
Recommended Posts