OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Arctic on 02 Sep 2002, 03:13:30

Title: Custom Music won't play!
Post by: Arctic on 02 Sep 2002, 03:13:30
I am trying to get some music to be played as a sound. I have the stringtable and description.ext files set up, and have a command line in a script that says: _this say "song". the script is activated in the init line of a radio object: this exec "RadioINTRO.sqs"

here is the description.ext commands:

Code: [Select]
class CfgMusic
{
      tracks[]={music};

      class music
      {
            name = "Stupify";
            sound[] = {\Music\Stupify.ogg,db+30, 1.0};
      };

};

class CfgSounds
      {
 
      sounds[]={song};

      class song
      {
            name = "Russian Radio (I Stand Alone)";
            sound[] = {"\sounds\StandAlone.ogg",db+30, 1.0};
            titles[] = {0, $STRM_song};
      };

I have the ogg file StandAlone in the sounds folder. I also have STRM_song in the stringtable file.
----------

During the intro, I recieve no error message (other than the incomplete trigger that ends the intro). The two guesses I have are that by the time the camera gets to the radio site, the sound is over, however, in the script that controls the radio song, I have it looped continuously. My second guess is that the error lies with the description.ext file.

I hope I have provided enough information for others to provide some answers to my question/problem.  

Title: Re:Custom Music won't play!
Post by: Black_Feather on 02 Sep 2002, 12:18:36
you need to close the cfgsounds class, and you don't need the put the path to the sounds dir just the filename.


class CfgMusic
{
      tracks[]={music};

      class music
      {
            name = "Stupify";
            sound[] = {\Music\Stupify.ogg,db+30, 1.0};
      };

};

class CfgSounds
      {

      sounds[]={song};

      class song
      {
            name = "Russian Radio (I Stand Alone)";
            sound[] = {"StandAlone.ogg",db+30, 1.0};
            titles[] = {0, $STRM_song};
      };
};