OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Azraell on 11 Oct 2002, 14:15:41
-
i posted this in the sounds and cutscenes forum but i didnt get much help there, so i try it here since more ppl come in here, maybe someone has had this problem. i wanted some custum music in my mission so i read over the tuts and other forums and decided to give it a whirl. heres the steps i took....
class CfgMusic
{
tracks[]= {};
class Songs
{
name = "song1";
sound[] = {\Music\razor.ogg, db+0, 1.0};
};
};
went to my missions folder again and made music folder, put razor.ogg into that music folder.
went into editor and made a trig, playmusic "song1"....correct so far?
the trig tripped, at start..... "music music1 not found"
yes, its in the music folder
this was in preview....so i figured had to be in actual game....
export to sp, new error message
No Entry 'config.bin/CFGweapon.CFGmusic' .....anyone have this problem at 1 time or another? i ve tried changing names, putting names where tracks is, everything....... ??? same messages over and over
-
class CfgMusic
tracks[]= {};
try: tracks[]= {"song1"};
:edit
and also
class Songs
try: class song1
::edit
ah yeah, just saw in cutscenes & sound, you already did that
hmm - then you could try
name = "";
instead of
name = "song1";
not sure if this helps (can't access ofp at work)
~S~ CD
-
well, ill poke around with the names some more, but i dont think itll work....i even tried making a new mission....all i had was the player, and the music trigger....and got the same messages
-
OK, try it again:
class CfgMusic
{
tracks[]= {song1};
class song1{name = "song1";sound[] = {\Music\razor.ogg, db, 1.0};};
};
If this doesn't work, post your whole description.ext, because
that
No Entry 'config.bin/CFGweapon.CFGmusic'
message let me start thinking about: maybe there's something
else causes your music not to work.
~S~ CD
-
[attachment deleted by admin]
-
hey, that did the trick mcnorth, however diff it was....chris was correct on something being wrong with desciption too, so i rewrote it and added ur way of doing it....like how it puts itin the list so u dont need playmusic "stupidcommand" thanks again guys! ;D ;D ;D
-
hey guys, it stopped working again....but i found out the prob, sorta, it only works when class cfgmusic entry is the only thing in the description.ext, if i add anything else it doesnt...here is my destription.....maybe i have something in the wrong place
onLoadIntro="Observation post #56"
onLoadMission="Defend this outpost!"
showCompass=1
showGPS=1
showMap=1
showNotepad=1
showWatch=1
debriefing=1
class Weapons
{
class HK
{
count = 1;
};
class M4
{
count = 1;
};
class M16
{
count = 1;
};
class M16GrenadeLauncher
{
count = 1;
};
class M60
{
count = 1;
};
class M21
{
count = 1;
};
class LAWLauncher
{
count = 1;
};
class CarlGustavLauncher
{
count = 1;
};
class Binocular
{
count = 1;
};
class NVGoggles
{
count = 1;
};
class Timebomb
{
count = 1;
};
class Mine
{
count = 1;
};
class Flare
{
count = 1;
};
class FlareRed
{
count = 1;
};
class FlareGreen
{
count = 1;
};
class FlareYellow
{
count = 1;
};
class SmokeShell
{
count = 1;
};
class SmokeShellRed
{
count = 1;
};
class SmokeShellGreen
{
count = 1;
};
class Pipebomb
{
count = 1;
};
class HandGrenade
{
count = 2;
};
};
class Magazines
{
class HK
{
count = 6;
};
class M4
{
count = 6;
};
class M16
{
count = 6;
};
class GrenadeLauncher
{
count = 6;
};
class Mortar
{
count = 6;
};
class M60
{
count = 6;
};
class M21
{
count = 6;
};
class LAWLauncher
{
count = 6;
};
class CarlGustavLauncher
{
count = 6;
class CfgMusic
{
tracks[]= {razor};
class razor
{
name = "song1";
sound[] = {\music\razor.ogg, db+0, 1.0};
};
};
whatcha think?
-
ok, i just got rid of the weps and ammo entries and it works, i know i had an extra bracket in there, so i ditched it and tested b4 i got rid of it all and it still didnt work, but once i deleted everything that had to do with weapons, it worked again....something in the weps was conflicting, maybe some1 more advanced will see the mistake that i could not... guess you suckers wont be able to choose ur own weapons b4 the mission.:P
-
It looks to me like the problem is after this part
class CarlGustavLauncher
{
count = 6;
You need the closing brace for the count (};) and then you need the closing brace for the magazines class. (also };)
So that part should look like this.
class CarlGustavLauncher
{
count = 6;
};
};
Starting from magazines class all the way to the end it should look like this.
class Magazines
{
class HK
{
count = 6;
};
class M4
{
count = 6;
};
class M16
{
count = 6;
};
class GrenadeLauncher
{
count = 6;
};
class Mortar
{
count = 6;
};
class M60
{
count = 6;
};
class M21
{
count = 6;
};
class LAWLauncher
{
count = 6;
};
class CarlGustavLauncher
{
count = 6;
}; //this was missing
}; //this was missing too
class CfgMusic
{
tracks[]= {razor};
class razor
{
name = "song1";
sound[] = {\music\razor.ogg, db+0, 1.0};
};
};
Except for the this was missing comments.
(I do that indent thing because it's so easy to lose track of the flow)
Hope this solves it for you.
mcnorth
-
yup, thanks man, ur the dude. that solved it! once they get the submission area open, keep an eye out for my mission, its my first, but i been going balls to the wall in making this worthy of play.