OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Dubieman on 11 Aug 2004, 00:17:13

Title: 2 .exts
Post by: Dubieman on 11 Aug 2004, 00:17:13
Well I have just gotten my sound files and made the .ext for them, all 27 of them :P. Now my mission already has a .ext for setidentity and weapon selection and GPS=1 stuff.

If I have Desciption.ext (the one with setidentity, ammo) and Description2.ext (sound files only) will the mission read both and "use" both?

Like the sounds won't go cause the .ext is duplicated well not duplicated but there are two?

Title: Re:2 .exts
Post by: Kaliyuga on 11 Aug 2004, 00:21:38
 Doubt it will work, 1 description.ext should be enough :P

:toocool:
Title: Re:2 .exts
Post by: Dubieman on 11 Aug 2004, 01:04:06
okay,
I'll merge them then.
Title: Re:2 .exts
Post by: macguba on 11 Aug 2004, 01:11:35
Use

//================================

or something to divide up the sections (sound, gear, etc) and thereby make it easier to see what's going on.
Title: Re:2 .exts
Post by: Dubieman on 11 Aug 2004, 01:19:40
Yea I got that, well CHOFPSE did it. I REALLY didn't want to handwrite or even copy/paste in 27 files/sounds.... ;D

I'm just that lazy. :D

The problem is solved now well, I think so, gotta make the sounds work in editor next so I'll keep this open just in case... :P
Title: Re:2 .exts
Post by: Dubieman on 11 Aug 2004, 02:27:07
I know this is a little sound and a little .ext but when I use unit say "File1" (its a .ogg) the sound doesn't go and the text that was there deletes itself... :P

Dunno, is playsound not gonna delete my text? Cause I figure playsound will make the sound come up...

And back to .ext's if I want to increase the colume so you can hear the sound I change:

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

TO

sound[] = {\sound\File1.ogg, db + 0.2, 1.0};

???
Title: Re:2 .exts
Post by: Dubieman on 11 Aug 2004, 02:55:49
Never mind those Questions. I'm a smart little bugger who just figured out he'd be writing a stringtable document until midnight tonight... :P

but the radio thing will be odd gotta look that up too... :P :P :P

EDIT: Man I'm confused and angry. I have ALL my radio messages and white text already to go not by stringtable. All I want is for the sound to play when I do the text like I'd like my code to be:

Code: [Select]
titletext ["Bah sounds are no fun sometimes","plain",1]
playsound "File1"

But when I do that it erases my text, and I just want to keep it there. :'( :-\

Title: Re:2 .exts
Post by: Planck on 11 Aug 2004, 04:17:00
Try changing the '1' to something like 10.


Planck
Title: Re:2 .exts
Post by: Dubieman on 11 Aug 2004, 05:51:31
Gaa nothing. It didn't work. I thought that number just made it take 10 secs for the text to show... :P

I dunno, this is wanderin into cam/sound territory.... :-\

Anyways I'm thinking the problem is with the .ext and the sound.

Code: [Select]
class File1
   {
      // Name to display in mission editor
      name = "File1";
      // Sound path, volume, pitch
      sound[] = {\sound\File1.ogg, db + 0, 1.0};
      // Sound title text (set to no text)
      titles[] = {0, ""};
   };

The problem is with the sound title text. Its set to no text or something and I'm not sure what to do. I deleted the
{0, ""};  part and it still didn't work. Then I deleted the whole

// Sound title text (set to no text)
      titles[] = {0, ""};

And still nothing.... :P

Thanks anyways Planck.


EDIT:::::

Wow, got something. Getting late so I can't fully test it. Damn that dentist appointment! :D

Changed:

      titles[] = {0, ""};

TO

      titles[] = {1, ""};

and the text showed for about a sec or so... I'll try some more later. If I'm correct, plz say so in the thread. If I'm wrong, plz yell at me. ;)

*yawns and rubs moniter induced sleepiness from eyes*



Title: Re:2 .exts
Post by: Sui on 12 Aug 2004, 09:16:13
Code: [Select]
titletext ["Bah sounds are no fun sometimes","plain",1]
playsound "File1"

But when I do that it erases my text, and I just want to keep it there. :'( :-\

If you have any titles in your sound (ie. the titles line has anything between the curly brackets), it will overwrite a titletext command.

I'd either get rid of the titletext and use a stringtable, or get rid of the title between the brackets in your .ext, and use the titletext ;)
Title: Re:2 .exts
Post by: Dubieman on 12 Aug 2004, 16:25:20
I'd do the stringtable but I already have all the text in the form of titletext...

So you're saying the .ext would look like this?


Code: [Select]
class File1
   {
      // Name to display in mission editor
      name = "File1";
      // Sound path, volume, pitch
      sound[] = {\sound\File1.ogg, db + 0, 1.0};
      // Sound title text (set to no text)
      titles[] = {1, "Bah, sound is no fun sometimes..."};
   

Like that? And when the sound is played that text shows? :P

thanks
Title: Re:2 .exts
Post by: Blanco on 12 Aug 2004, 16:42:39
try :

cuttext ["Bah sounds are no fun sometimes","plain",1]

...instead of titletext
Title: Re:2 .exts
Post by: Dubieman on 12 Aug 2004, 17:02:44
Sorry to be noobish but could you explain more?

Like where does cuttext go? In the .ext  or just as a replacement for my titletext in my intro? :P

thanks for the replies
Title: Re:2 .exts
Post by: macguba on 12 Aug 2004, 17:04:22
Replacement for titletext.
Title: Re:2 .exts
Post by: Dubieman on 12 Aug 2004, 17:10:11
Holy shit yay. ;D ;D

Finally can get this beast done. Spent a night and a few hours on this now I can get it done. ;D

Thank you all ;), well I'll once again leave this here in case I hit yet another snag. ::)

lol :P
Title: Re:2 .exts
Post by: Dubieman on 12 Aug 2004, 22:36:55
Another snag, wow that was fast.

I'm guessing this is a .ext problem now, cause my first sound works. I got sounds labeled (File1, File2, File3,...File27) and they are .ogg and in my Sound folder. Now when I put playsound "File2" it says it cannot find it.

Then every other sound after does not play and no error comes up. :P Only File1 works.

Here's the nesssary part of the .ext without ammo and stuff.

Code: [Select]
// ***********************************************************************

class CfgSounds
{
   // List of sounds
   sounds[] = {File1, File10, File11, File12, File13, File14, File15, File16, File17, File18, File19, File2, File20, File21, File22, File23, File24, File25, File26, File27, File3, file4, File5, file6, File7, File8, File9};

   // Class definition needed for each sound
   class File1
   {
      // Name to display in mission editor
      name = "File1";
      // Sound path, volume, pitch
      sound[] = {\sound\File1.ogg, db + 0, 1.0};
      //
      titles[] = {0, ""};
};
   };
   class File10
   {
      // Name to display in mission editor
      name = "File10";
      // Sound path, volume, pitch
      sound[] = {\sound\File10.ogg, db + 0, 1.0};
      // Sound title text (set to no text)
      titles[] = {0, ""};
   };
   class File11
   {
      // Name to display in mission editor
      name = "File11";
      // Sound path, volume, pitch
      sound[] = {\sound\File11.ogg, db + 0, 1.0};
      // Sound title text (set to no text)
      titles[] = {0, ""};
   };
   class File12
   {
      // Name to display in mission editor
      name = "File12";
      // Sound path, volume, pitch
      sound[] = {\sound\File12.ogg, db + 0, 1.0};
      // Sound title text (set to no text)
      titles[] = {0, ""};
   };
   class File13
   {
      // Name to display in mission editor
      name = "File13";
      // Sound path, volume, pitch
      sound[] = {\sound\File13.ogg, db + 0, 1.0};
      // Sound title text (set to no text)
      titles[] = {0, ""};
   };
   class File14
   {
      // Name to display in mission editor
      name = "File14";
      // Sound path, volume, pitch
      sound[] = {\sound\File14.ogg, db + 0, 1.0};
      // Sound title text (set to no text)
      titles[] = {0, ""};
   };
   class File15
   {
      // Name to display in mission editor
      name = "File15";
      // Sound path, volume, pitch
      sound[] = {\sound\File15.ogg, db + 0, 1.0};
      // Sound title text (set to no text)
      titles[] = {0, ""};
   };
   class File16
   {
      // Name to display in mission editor
      name = "File16";
      // Sound path, volume, pitch
      sound[] = {\sound\File16.ogg, db + 0, 1.0};
      // Sound title text (set to no text)
      titles[] = {0, ""};
   };
   class File17
   {
      // Name to display in mission editor
      name = "File17";
      // Sound path, volume, pitch
      sound[] = {\sound\File17.ogg, db + 0, 1.0};
      // Sound title text (set to no text)
      titles[] = {0, ""};
   };
   class File18
   {
      // Name to display in mission editor
      name = "File18";
      // Sound path, volume, pitch
      sound[] = {\sound\File18.ogg, db + 0, 1.0};
      // Sound title text (set to no text)
      titles[] = {0, ""};
   };
   class File19
   {
      // Name to display in mission editor
      name = "File19";
      // Sound path, volume, pitch
      sound[] = {\sound\File19.ogg, db + 0, 1.0};
   // Sound title text (set to no text)
      titles[] = {0, ""};
   };
   class File2
   {
      // Name to display in mission editor
      name = "File2";
      // Sound path, volume, pitch
      sound[] = {\sound\File2.ogg, db + 0, 1.0};
      // Sound title text (set to no text)
      titles[] = {0, ""};
   };
   class File20
   {
      // Name to display in mission editor
      name = "File20";
      // Sound path, volume, pitch
      sound[] = {\sound\File20.ogg, db + 0, 1.0};
      // Sound title text (set to no text)
      titles[] = {0, ""};
   };
   class File21
   {
      // Name to display in mission editor
      name = "File21";
      // Sound path, volume, pitch
      sound[] = {\sound\File21.ogg, db + 0, 1.0};
      // Sound title text (set to no text)
      titles[] = {0, ""};
   };
   class File22
   {
      // Name to display in mission editor
      name = "File22";
      // Sound path, volume, pitch
      sound[] = {\sound\File22.ogg, db + 0, 1.0};
      // Sound title text (set to no text)
      titles[] = {0, ""};
   };
   class File23
   {
      // Name to display in mission editor
      name = "File23";
      // Sound path, volume, pitch
      sound[] = {\sound\File23.ogg, db + 0, 1.0};
      // Sound title text (set to no text)
      titles[] = {0, ""};
   };
   class File24
   {
      // Name to display in mission editor
      name = "File24";
      // Sound path, volume, pitch
      sound[] = {\sound\File24.ogg, db + 0, 1.0};
      // Sound title text (set to no text)
      titles[] = {0, ""};
   };
   class File25
   {
      // Name to display in mission editor
      name = "File25";
      // Sound path, volume, pitch
      sound[] = {\sound\File25.ogg, db + 0, 1.0};
      // Sound title text (set to no text)
      titles[] = {0, ""};
   };
   class File26
   {
      // Name to display in mission editor
      name = "File26";
      // Sound path, volume, pitch
      sound[] = {\sound\File26.ogg, db + 0, 1.0};
      // Sound title text (set to no text)
      titles[] = {0, ""};
   };
   class File27
   {
      // Name to display in mission editor
      name = "File27";
      // Sound path, volume, pitch
      sound[] = {\sound\File27.ogg, db + 0, 1.0};
      // Sound title text (set to no text)
      titles[] = {0, ""};
   };
   class File3
   {
      // Name to display in mission editor
      name = "File3";
      // Sound path, volume, pitch
      sound[] = {\sound\File3.ogg, db + 0, 1.0};
      // Sound title text (set to no text)
      titles[] = {0, ""};
   };
   class file4
   {
      // Name to display in mission editor
      name = "file4";
      // Sound path, volume, pitch
      sound[] = {\sound\file4.ogg, db + 0, 1.0};
      // Sound title text (set to no text)
      titles[] = {0, ""};
   };
   class File5
   {
      // Name to display in mission editor
      name = "File5";
      // Sound path, volume, pitch
      sound[] = {\sound\File5.ogg, db + 0, 1.0};
      // Sound title text (set to no text)
      titles[] = {0, ""};
   };
   class file6
   {
      // Name to display in mission editor
      name = "file6";
      // Sound path, volume, pitch
      sound[] = {\sound\file6.ogg, db + 0, 1.0};
      // Sound title text (set to no text)
      titles[] = {0, ""};
   };
   class File7
   {
      // Name to display in mission editor
      name = "File7";
      // Sound path, volume, pitch
      sound[] = {\sound\File7.ogg, db + 0, 1.0};
      // Sound title text (set to no text)
      titles[] = {0, ""};
   };
   class File8
   {
      // Name to display in mission editor
      name = "File8";
      // Sound path, volume, pitch
      sound[] = {\sound\File8.ogg, db + 0, 1.0};
      // Sound title text (set to no text)
      titles[] = {0, ""};
   };
   class File9
   {
      // Name to display in mission editor
      name = "File9";
      // Sound path, volume, pitch
      sound[] = {\sound\File9.ogg, db + 0, 1.0};
      // Sound title text (set to no text)
      titles[] = {0, ""};
   };
};




And the part of the intro when I put the File2 in....

Code: [Select]
;=== 14:08:47
_camera camSetTarget [105605.63,7518.66,6618.32]
_camera camSetPos [5901.34,3522.43,1.35]
_camera camSetFOV 0.700
_camera camCommit 0
@camCommitted _camera
~6
playsound "File2"
~6
;=== 14:09:30
_camera camSetTarget [8333.68,103266.09,-6601.60]
_camera camSetPos [5898.76,3517.57,1.29]
_camera camSetFOV 0.700
_camera camCommit 0
@camCommitted _camera

However File1 is used like this....
Code: [Select]
playsound "File1"
cuttext ["All units get ready, the target is approaching.","plain down",1]


And like I said above, it won't work.... >:( :P

thanks once again... :)
Title: Re:2 .exts
Post by: Dubieman on 13 Aug 2004, 02:07:47
Okay I examined a BIS mission with sounds and found they leave

sounds[] = {File1, File10, File11, File12, File13, File14, File15, File16, File17, File18, File19, File2, File20, File21, File22, File23, File24, File25, File26, File27, File3, file4, File5, file6, File7, File8, File9};


empty, like this

sounds[] = {}


now I tried that and still File2 cannot be found. I tried looking in effects where File1 is listed but now I have a new question. Is my sound drop down menu maxed? ECP convientantly dropped every sound it has in my drop down menu as did the C130, F18, and a few other addons.

Can this be problematic? No more sounds after a bit? :P

   


   

Title: Re:2 .exts
Post by: Unnamed on 13 Aug 2004, 11:09:07
Code: [Select]
class CfgSounds
{
   // List of sounds
   sounds[] = {File1, File10, File11, File12, File13, File14, File15, File16, File17, File18, File19, File2, File20, File21, File22, File23, File24, File25, File26, File27, File3, file4, File5, file6, File7, File8, File9};

   // Class definition needed for each sound
   class File1
   {
      // Name to display in mission editor
      name = "File1";
      // Sound path, volume, pitch
      sound[] = {\sound\File1.ogg, db + 0, 1.0};
      //
      titles[] = {0, ""};
};
   };

Looks like your ending your CfgSounds section after File1? You have one extra bracket at the end of the above code.
Title: Re:2 .exts
Post by: Dubieman on 13 Aug 2004, 16:28:23
OMG I feel so stupid now, :-[  so easy to fix that damn thing...

Thanks all of you for helping.:thumbsup:  ;)