Jump to content
Sign in to follow this  
i_need_help

Help with music in my mission

Recommended Posts

mad_o.gif i did everything the f&^%$#@ thing said, made the description.ext file put the music in it, and put in the trigger: playmusic Sly and the Family Stone - War (What is it good for) and it cant find it

Share this post


Link to post
Share on other sites

// ***********************************************************************

// **** Description file for Operation Flashpoint

// **** Generated by Chris's OFP Script Editor

// **** Create Description Wizard

// ***********************************************************************

class CfgMusic

{

// List of music tracks (.ogg files without the .ogg extension)

tracks[] = {Sly and the Family Stone - War (What is it good for)};

// Class definition needed for each music track

class Sly and the Family Stone - War (What is it good for)

{

// Name to display in mission editor

name = "Sly and the Family Stone - War (What is it good for)";

// Music path, volume, pitch

sound[] = {\music\Sly and the Family Stone - War (What is it good for).ogg, db + 0, 1.0};

};

};

Share this post


Link to post
Share on other sites

First of all, just to make it easier re-name your music file to sly.ogg Make sure it's in the subfolder named "music" Then in the mission editor write: PlayMusic "sly" and it should work.

Note that every time you save this description.ext you have to load you mission in the mission editor.

put this in you description.ext instead smile_o.gif

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class CfgMusic

{

tracks[]=

{

sly

};

class sly

{

name = "sly";

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

};

}

Share this post


Link to post
Share on other sites

i have a similar problem on i cant seem to get one file to play music but not the other sad_o.gif any help on that? mine is my description.ext is the same as his only twice

Share this post


Link to post
Share on other sites

Is it like this?

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class CfgMusic

{

tracks[]=

{

sound1, sound2

};

class sound1

{

name = "sound1";

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

};

class sound2

{

name = "sound2";

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

};

}

Share this post


Link to post
Share on other sites

I wanted to point out that where is says db+0 you can change the number to adjust the Volume of the track thats playing.

Share this post


Link to post
Share on other sites

So you saved it in the mission editor as a multiplayer mission and the music didn't work?

- Did you happen to change the name when saving it?

eg in the editor your mission was saved as horsymap but then when converting you saved it as donkeymap ?

Share this post


Link to post
Share on other sites
but 0 works as a default volume, right?

Yes it does

*Edit, i tried to stop this from posting but the ones used had a default of db+1 sorry for the dual postings.

Share this post


Link to post
Share on other sites
but 0 works as a default volume, right?

The description.ext i started out with had a default of db+1 not sure what will happen if its 0.

Share this post


Link to post
Share on other sites

Hey,

Do any of you guys know how to have a mission play music,

but have it start to play half way through the song?

Yes i did already search...

Share this post


Link to post
Share on other sites

where exactly does the music folder go? im not understanding this. and does the ogg file go in the music folder. where does the discription.ext go. i have them all just mixed up on where they go. rock.gif

Share this post


Link to post
Share on other sites
Hey,

Do any of you guys know how to have a mission play music,

but have it start to play half way through the song?

Yes i did already search...

Quote[/b] ]

playMusic nameAndPos

Operand types:

nameAndPos: Array

Type of returned value:

Nothing

Description:

Play music defined in description.ext. Format of nameAndPos is [name,position], position is in seconds.

Example:

playMusic ["Track13", 30]

RED

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  

×