Jump to content

Ambient music


Olafo

Recommended Posts

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

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 by angelwraith
Link to comment
Share on other sites

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...