Jump to content

Recommended Posts

In your mission folder, make a "sound" folder. Drop the sounds/music you want in there, and make sure they are ogg format. To convert stuff to ogg, use a program like Audacity.

Next, in your mission's description.ext list sounds like this:

class CfgSounds
{
// List of sounds (.ogg files without the .ogg extension)
sounds[] = {track1, track2};

// Definition for each sound
class track1
{
	name = "track1"; // Name for mission editor
	sound[] = {\sound\track1.ogg, 1, 1.0};
	titles[] = {	};
};
class track2
{
	name = "track2"; // Name for mission editor
	sound[] = {\sound\track2.ogg, 1, 1.0};
	titles[] = {	};
};
};

Then in the editor, on your trigger's activation field, put in:

playSound track1

You can also add music with "cfgMusic" instead of "cfgSound", but then players with music off won't hear it. I usually use sound so everyone is forced to hear it (needed for epic intros :P )

Edited by Apocca
Oops, forgot to edit classnames.

Share this post


Link to post
Share on other sites

This didn't work for me.

Does the .ogg file have to be at any particular sample rate?

Share this post


Link to post
Share on other sites
what is your missions description.ext?

It's a file you create in your mission folder, like any SQF or SQS file.

Share this post


Link to post
Share on other sites

is it just a text doucument? i made a mission and saved it called "sound test". Quit out of the game, went to documents/arma2/missions/sound%test, and created a text document called "description".

In the sound%test mission folder i made a folder called "sound", there i saved an .ogg music file called "track1".

In the "description" text file i typed this:

class CfgSound

{

// List of sounds (.ogg files without the .ogg extension)

sounds [] = {track1};

// Definition for each sound

class track1

{

name = "track1"; // Name for mission editor

sound [] = {\sound\track1.ogg, 1, 1.0};

titles [] = { };

};

};

Saved this and opened the game back up.

Opened my mission back up, and put a trigger, activated by Blufor, in the "On Act:" i typed "playSound track1" (without the quotes)

Place a USMC rifleman, run into the trigger and nothing happens.

Any advice?

Share this post


Link to post
Share on other sites

Also unable to get my sound to play on a trigger.

Intro.ogg / 44010 / mono

description.ext:

{

// List of sounds (.ogg files without the .ogg extension)

sounds[] = {intro_01};

// Definition for each sound

class track1

{

name = "intro_01"; // Name for mission editor

sound[] = {\sound\intro_01.ogg, 1, 1.0};

titles[] = { };

};

};

Trigger: playSound intro_01

Nothing heard.

Tried also using:

sound[] = {\sound\intro_01.ogg, db + 0, 1.0};

Share this post


Link to post
Share on other sites

Quotes are missing in the trigger.....did it for me. :)

playSound "track1"

Thanks a lot for this post. Works great!

Edited by katdogfizzow

Share this post


Link to post
Share on other sites
Also unable to get my sound to play on a trigger.

Intro.ogg / 44010 / mono

description.ext:

{

// List of sounds (.ogg files without the .ogg extension)

sounds[] = {intro_01};

// Definition for each sound

class intro_01

{

name = "intro_01"; // Name for mission editor

sound[] = {\sound\intro_01.ogg, 1, 1.0};

titles[] = { };

};

};

Trigger: playSound intro_01

Nothing heard.

Tried also using:

sound[] = {\sound\intro_01.ogg, db + 0, 1.0};

Try naming the 1st entry the same as the other 2?

Share this post


Link to post
Share on other sites

how do you change the music when the map start ??

anybody ???

Edited by massi64

Share this post


Link to post
Share on other sites

Massi64,

Not really sure what you mean, if you put

playmusic "track"

into the activation field and true in the condition field it will start right away. If you want to fade the music after a certain amount of time then use this

Have not tried this yet but this might work for you http://www.armaholic.com/page.php?id=6688

Edited by cobra4v320

Share this post


Link to post
Share on other sites
is it just a text document? i made a mission and saved it called "sound test". Quit out of the game, went to documents/arma2/missions/sound%test, and created a text document called "description".

It's a plaintext file called description.ext. The extension is important. You'll probably need to go to Explorer's Tools menu and select Folder Options, and turn off the option to hide file extensions for known file types. You should see your new file is called "description.txt" - rename it to .ext and confirm the warning and it should work.

Also you should familiarise yourself with the arma2.rpt file, or launch the game with the -showScriptErrors parameter that was added in 1.03 so you'll see in-game when scripts have problems. Many things seem to work okay even when the script doesn't run properly.

Share this post


Link to post
Share on other sites
Massi64,

Not really sure what you mean, if you put

playmusic "track"

into the activation field and true in the condition field it will start right away. If you want to fade the music after a certain amount of time then use this

Have not tried this yet but this might work for you http://www.armaholic.com/page.php?id=6688

well what i mean is when i start a domination map from xeno the 1.03 even the erlyer versions the map start with a music Track07_Last_Men_Standing.ogg and i check on the description file but there is no script related to that music , then i try to add this :

};

class CfgMusic

{

tracks[]={Track02_Insertion};

class Track02_Insertion

{

name = "Track02_Insertion";

sound[] = {"\music\Track02_Insertion.ogg", db+10, 1.0};

titles[] = {0, ""};

};

};

but the music didn't change so if someone knows please help

:confused::confused::confused:

Share this post


Link to post
Share on other sites

You're trying to play the tracks that come with the game? If so, then I don't think you'd need to add them to your missions' CfgMusic as they should already be present from the game's global config. I don't know what the class names are though.

You could check the init.sqs from the domination map to see if it's played from there. The other option would be to use a map-editor trigger that will activate right at the start, and use the effects options to play the desired track.

Actually if you want to do a bit of research - you could set up any mission with a map-editor trigger that plays the track you want, save it, then open up the mission.sqm in a text editor and find your trigger... I think you should be able to see what track it's playing that way.

---------- Post added at 09:41 AM ---------- Previous post was at 09:34 AM ----------

In fact I did just that, and what you want is:

playMusic "Track02_Insertion"

You don't need anything in your description.ext for playing build-in sounds/music, you only need that for adding your own custom sounds to the mission.

I also checked Track 6 Abandoned Battlespace, and the name is Track06_Abandoned_Battlespace. So I think they all follow the same format and it should be easy to guess their classnames.

Share this post


Link to post
Share on other sites
You're trying to play the tracks that come with the game? If so, then I don't think you'd need to add them to your missions' CfgMusic as they should already be present from the game's global config. I don't know what the class names are though.

You could check the init.sqs from the domination map to see if it's played from there. The other option would be to use a map-editor trigger that will activate right at the start, and use the effects options to play the desired track.

Actually if you want to do a bit of research - you could set up any mission with a map-editor trigger that plays the track you want, save it, then open up the mission.sqm in a text editor and find your trigger... I think you should be able to see what track it's playing that way.

---------- Post added at 09:41 AM ---------- Previous post was at 09:34 AM ----------

In fact I did just that, and what you want is:

playMusic "Track02_Insertion"

You don't need anything in your description.ext for playing build-in sounds/music, you only need that for adding your own custom sounds to the mission.

I also checked Track 6 Abandoned Battlespace, and the name is Track06_Abandoned_Battlespace. So I think they all follow the same format and it should be easy to guess their classnames.

i look everywhere to find a trigger for that song but nothing , and Xeno dosen't anser my questions , so a must be a secret lol

but i will still serch for a solution

:confused::confused::confused:

Share this post


Link to post
Share on other sites

I just gave you the solution, didn't I? If you're playing one of the game's built-in tracks like "Insertion" then you don't need anything in your mission's description.ext - the track is already configured as part of the game. Its name is Track02_Insertion so to play it, you just need to run the script

playMusic "Track02_Insertion"

For example as a test, I put this in the "On Act" field of a waypoint for my unit and it started playing when I reached the waypoint. But you can use it anywhere.

Share this post


Link to post
Share on other sites
I just gave you the solution, didn't I? If you're playing one of the game's built-in tracks like "Insertion" then you don't need anything in your mission's description.ext - the track is already configured as part of the game. Its name is Track02_Insertion so to play it, you just need to run the script

playMusic "Track02_Insertion"

For example as a test, I put this in the "On Act" field of a waypoint for my unit and it started playing when I reached the waypoint. But you can use it anywhere.

i try but a dosen't work , can you be more specific ??

Share this post


Link to post
Share on other sites

Go to the mission editor. Load Utes island with a blank mission.

Double-click on the runway somewhere and place a player-controlled rifleman or whatever.

Switch to waypoints mode and double-click a little ways down the runway to add a move waypoint. In the "On Act" field for that waypoint, add the code:

playMusic "Track02_Insertion"

Make sure "Always show" is selected for the waypoint so it'll be visible in-game; or if you're playing on a higher difficulty level, just make sure you know where you placed it.

Hit the preview button and run to the waypoint. When you get close enough for the game to consider it completed, the "on act" script will be executed and the track will start playing.

---

An alternative to having it activated by the move waypoint is to add a trigger covering a particular part of the map, and set it to activate when BLUFOR Is Present. Then in its activation field put the playMusic command. This method is a little more flexible if you want to start the track when units are at a particular location.

Share this post


Link to post
Share on other sites
Go to the mission editor. Load Utes island with a blank mission.

Double-click on the runway somewhere and place a player-controlled rifleman or whatever.

Switch to waypoints mode and double-click a little ways down the runway to add a move waypoint. In the "On Act" field for that waypoint, add the code:

playMusic "Track02_Insertion"

Make sure "Always show" is selected for the waypoint so it'll be visible in-game; or if you're playing on a higher difficulty level, just make sure you know where you placed it.

Hit the preview button and run to the waypoint. When you get close enough for the game to consider it completed, the "on act" script will be executed and the track will start playing.

---

An alternative to having it activated by the move waypoint is to add a trigger covering a particular part of the map, and set it to activate when BLUFOR Is Present. Then in its activation field put the playMusic command. This method is a little more flexible if you want to start the track when units are at a particular location.

yes a works fine but how can i take the original music off from the domination map and put a new one on ?? you know when you log in into the game there is an intro music , i will like to change that one . maybe i can't explain myself

but thanks now i know something new

Share this post


Link to post
Share on other sites

When I wanted to change the opening music for Domination, I just named my file the same as the original. :)

Share this post


Link to post
Share on other sites
In your mission folder, make a "sound" folder. Drop the sounds/music you want in there, and make sure they are ogg format. To convert stuff to ogg, use a program like Audacity.

Next, in your mission's description.ext list sounds like this:

class CfgSounds
{
// List of sounds (.ogg files without the .ogg extension)
sounds[] = {track1, track2};

// Definition for each sound
class track1
{
	name = "track1"; // Name for mission editor
	sound[] = {\sound\track1.ogg, 1, 1.0};
	titles[] = {	};
};
class track2
{
	name = "track2"; // Name for mission editor
	sound[] = {\sound\track2.ogg, 1, 1.0};
	titles[] = {	};
};
};

Then in the editor, on your trigger's activation field, put in:

playSound track1

You can also add music with "cfgMusic" instead of "cfgSound", but then players with music off won't hear it. I usually use sound so everyone is forced to hear it (needed for epic intros :P )

Ok I feel retarded. I literally copy and pasted what you said, placed the .ogg in the right place (plus another .ogg just so I have a track2). When it executes the script it tells me "Sound track1 not found."

What could this be? :confused:

Share this post


Link to post
Share on other sites
Ok I feel retarded. I literally copy and pasted what you said, placed the .ogg in the right place (plus another .ogg just so I have a track2). When it executes the script it tells me "Sound track1 not found."

What could this be? :confused:

thanks i try that but dosen't work for the intro music of the map

Share this post


Link to post
Share on other sites

Your file is definitely called Description.ext? Windows by default hides the file extension so it might actually be called Description.ext.txt - which won't be read by the game. You can turn this off by going to Tools - Folder Options and turning the "Hide extensions for known file types" option off. Also, if you modify this file the changes won't be seen by the game until you re-save the mission. You don't need to make any actual changes to the mission, you just need to hit the Save button and then you can Preview it.

Here's a quick demo mission with two sounds (taken from DCS: Black Shark). It's about as simple as it gets so there shouldn't be any extraneous bits to add confusion. If you walk forward a few metres into the trigger, a thunder sound will be played. If you walk out of the trigger, an explosion will play.

http://mirror.quex.org/arma/SoundDemo.utes.zip (56KB)

Just extract to your missions folder and load it up in the editor.

Out of my own curiosity I did some quick testing of the format and found:

  • I don't know what the sounds[] list defined at the start actually does - maybe preloading? Making this empty had no noticable effect.
  • The name defined by the "class" name for each sound is the name you use for playSound etc.
  • The name = "..." parameter controls what's displayed in the mission editor. You can also play these sounds by using the Effects option; they show up at the bottom of the "Anonymous" and "Voice" categories

---------- Post added at 03:56 PM ---------- Previous post was at 03:54 PM ----------

thanks i try that but dosen't work for the intro music of the map

Your issue is more of a Domination thing than general scripting/mission editing. I think you'd need to find where in the Domination mission it actually plays the sound, and then change that to have it play what you want.

Maybe see if you can find a forum where that particular gametype is discussed and someone might be able to provide a pointer. Either that or trawl/search through the scripts.

If it plays its own custom sound you should be able to just overwrite it with your track, but earlier it sounded like it plays a built-in track so that's not a very desirable method.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×