Forums Index >> General >> How to add your own music in your mods...
Page : <1> :
Thanks Big Show!! XD
Monday, March 13, 2006 at 9:08:47 PM
Move to modding...
Tuesday, March 14, 2006 at 6:23:02 AM
Page : <1> :
I really don't know how no one ever found out how to do this... So simple! XD
Pre-installation
1. Install Audacity
2. Start it up and import your song
3. Export as "OGG Vorbis"
4. Name the file ANYTHING.ogg (don't take this literally)
5. Save into the directory Thinktanks/game/data/sound
Adding it to a mission
1. Open up your special.cs file. If you don't have one download it at Max's website . Make sure to download the orginal scripts though!
2. Copy this into the top of the file:
datablock AudioProfile(SONG1)
{
filename = "~/data/sound/Anything.ogg";
description = "Audio2D";
preload = true;
};
remeber to change anything.ogg to what you named your song
3. Close and save the file
4. Open up the mission you want the song in.
5. Find this line:
musicTrack = "Lush";
replace with
musicTrack = " ";
6. At the top of the file write this in
function TankData::onAdd(%this,%obj)
{
if(%obj.client.deaths == 0)
{
%obj.client.schedule(1000,"play2D","Song1");
}
}
7. Close and save
8. Start up TT and enjoy!
Side notes: -an average song takes 25 minutes in TT's engine to download
-have a predownload ready...
-the song will only play once, then stop