OFPEC Forum

Addons & Mods Depot => Arma2 - Addons & Mods Discussion => Topic started by: loki72 on 11 Jun 2009, 22:22:02

Title: custom music from addon (solved)
Post by: loki72 on 11 Jun 2009, 22:22:02
not sure where this thread goes since it deals with Arma 2 config/ addon problems...

but... i can not get a custom track to show up in the game.

config.cpp
Code: [Select]
class CfgMusic
{
 tracks[]={};

 class Tango
 {
  name = "Tango";
  sound[] = {"\loki_lk\Tango.ogg", 1.0, 1.0};
 };
 
};

Musicplayer.sqf
Code: [Select]
lbClear 4;

lbAdd [4,"The Goodies - Tango"];

lbSetCurSel [4,0];

Request2 =
{

switch (lbText [4,lbCurSel 4]) do
{
case "The Goodies - Tango": {playMusic ["Tango", 30] ; hint "The Goodies - Tango";};


};

};

everything is fine until i hit the request button.. the hint comes up.. but in the arma.rpt file it says

Quote
Music Tango not found


Tango.ogg is in the right spot...
44k 16 bit mono

it plays and shows up fine if i do it from a mission.. just not from an addon?

 :blink:


EDIT: fixed...
removed
Code: [Select]
tracks[]={}; and it showed up and plays fine.

thanks i0n0s

 :)