Game Development Community

How do I load and play background music on T3D 1.1?

by Svengali · in Torque 3D Beginner · 06/15/2011 (8:30 am) · 4 replies

How do I load and play background music on T3D 1.1?

Well, I am now about 36 hrs past my deadline, and I still have about 1000 database calls to rewrite and my music guy is coming in about an hour... Can someone tell me real quick how I can put background music on a level? I know how to put an emitter in the mission and have it play, but I need to put a 3 min loop of some music throughout one entire map and things have change since I did it last, like since TGEA. Thanks in advance, I am sure this is something many could use to know, and the docs are still real vague still.

About the author

Creator of SvengaliGames, and developing the once up coming title NightLife: The MMORPG Of Dark Horror. Now named ATROX NOCTIS: Daemons Cradle- www.svengaligames.com


#1
06/15/2011 (12:00 pm)
This is in level, right? Not in Main Menu...

Make sure it's ogg or wav format.

Get you datablocks sorted first in "art/datablocks/audioProfiles.cs":

new SFXProfile(Theme)
{
   filename = "art/sound/music/etc_etc_etc.ogg";
   description = "AudioMusic2D";
   preload = true;//or false - as you like
};

Make sound emitter in-game:

playOnAdd = "true"
sourceGroup = "AudioChannelMusic";
useTrackDescription = "true";

Point it to your track description!

et voila




#2
06/15/2011 (2:46 pm)
Alternatively, create a profile or playlist, put it on a new SFXAmbience, and assign the ambience to the LevelInfo's "soundAmbience".
#3
09/22/2012 (1:04 pm)
Ops wrong thread... Sorry.
#4
09/22/2012 (1:18 pm)
Hurray! :)