So you want to play trigger sounds or music in your level? Here is what I'll be teaching you how to do.http://www.youtube.com/watch?v=jmNMLBX728I
-Please note you need a converter, so you can convert your audio files to .ogg/.wav. I can do this for you for free just send me a pm. Or post here viewtopic.php?f=21&t=7432-
To begin open your TorchED file directory(The folder).
In this folder navigate to your sounds folder media/sounds
What ever sound you are trying to put into the game, depends on the folder we go into next. Lets go with an actually full song like "Yakety Sax"(I'll include this at the bottom for you to use and test.). Since were doing a song and the closest thing to that in the sound folder is Ambient, lets pick that one. In that folder should be a "Background" folder. Click it. Now in this folder make a new folder and call it "Chase", it should now look like this.
In the "Chase" folder. Rename the "Yakety Sax" to "Chase". So in this folder it should look like this.
Now your folders are all set up for you new song/sound/music. Open TorchED, when it's loaded go to Data Editors at the top and click "sound banks".
Ok in this window, the left side where it says category. Click the + sign next to it. A window will pop up asking you for a name, it doesn't matter what you name this, this is the name it shows up in the TorchED sound properties. But for this Tutorial lets just name it "Chase". Next you need a "Sound Bank", below the category area we just completed, below that is the are you create "Sound Banks" press the + sign there. This needs to be the same name as the folder we created in "media/sounds/ambient/background/"Chase"". So name it "Chase", it should now look like this.
Ok next we need the sound/song/music file. For this tutorial, you should've downloaded the "Yakety Sax" audio file I attached. It should also have been put in the "Chase" folder we created and it should've been named "Chase".
Now on the far right is a big white box and another + sign, click the + sign and navigate to the audio file in the chase folder. Once you found it, click open. Your "Sound banks" window should now look like this.
To check and make sure you did everything right, you can do 2 things. Click the big green check mark at the top right of the "Sound banks" window or click the file in the white window and hit play sound, if it plays then you did it right, if not you should restart the tutorial and follow it thoroughly. If you click the grean check mark, to know if you did it right, it should pop up another window a "text editor" and it should be blank. Ok once you've done everything correctly, click the save button at the top left of the window and then hit exit, if it asks you to save unsaved data before exiting, hit yes. Now back in the TorchED main window, lets get out sound file playing. Let's make it so that when we pull a trigger(Lever) the music plays, then when we move to a certain spot it stops. On the far left click the layout tab, right click in the white area of this tab and go to sounds then click sound. Select the new sound unit you just created by clicking on it in the layout tab. Now go over to the right and in the properties tab, at the top you'll see "Category", and "Sound Group". "Sound Group" is actually "Sound Bank". -Please note that sometimes for this next step you might need to save your layout and restart TorchED, for the "Category and Sound bank" you created to show up.- Click the drop down box in Category and navigate to "Chase", do the same with "Sound Group"(You probably won't need to, since it will automatically do it for you). Now that you have that set, go down a little and change the "Start on load" to false, and the "Radius" to what ever you desire, for this tutorial just set it for 50. Everything should look like this.
Now on the left side again in the "Layout Tab", right click navigate to "building blocks" then choose "Unit trigger". Again on right click and navigate to "Logic" then choose either "Player trigger box" or "Player trigger sphere"(I like spheres), Right click once more and navigate to "Logic" then "Logic Group". Click the "Unit trigger" you made and in the properties tab, locate "Model" and hit the drop down box and navigate to "Simple lever", now go back to your layout tab. Click on the "Logic Group" you made, and then at the top of the tab should appear a "Tool set icon", click it. This opens up the "Logic Group Editor", now drag your "Unit trigger, Player trigger sphere or box, and the sound" into this window. Just click and drag them from the "layout tab" window into the "Logic Group Editor". In this Editor, right click the unit trigger, go to "Out puts" then find "Triggered". Now right click the "Sound"(should be a yellow speaker), and go to "Inputs" and choose "Play". Now connect the "Triggered" and "Play". Since we want to turn this song off since it can get annoying, this is where the "Player Trigger box/sphere" comes in, Right click it, go to "Out puts" then click on "Triggered". Go back to your "Unit Trigger", right click it and find "Inputs" then click on the first "Reset" that you see in the list. Now connect them. Now go back to your "Sound", right click it and find "Inputs" then click on "stop". Connect the Triggered from your "Player trigger box/sphere" to the "Stop" on your "Sound". It should all look like this.
Now jump in the play mode and try it out. Click on the lever and the music should start playing, then to turn it off walk over the player trigger box/sphere you made to make it turn off. The final result should look like this.http://www.youtube.com/watch?v=jmNMLBX728I