OFPEC Forum

Addons & Mods Depot => OFP - Addons & Mods General => Topic started by: Tomb on 26 Apr 2003, 19:07:27

Title: cpp prob. animation sound ?
Post by: Tomb on 26 Apr 2003, 19:07:27
I have this building, and I want my own sound starting everytime a door is used (tried both .ogg & .wav without luck).


Anyóne knowsabout this  ??? :D


Title: Re:cpp prob. animation sound ?
Post by: Tomb on 26 Apr 2003, 23:20:07
 ::) mebbe I should add some EXTENDED info?!

Here's what my config looks like atm. :

=======================================

class CfgSounds
{
   class TMB_House04door
   {
      sound[]={"\TMB_HMGF\door.wav",db+6,1};
      name="TMB_House04door";
      titles[] = {};
   }
};

...

(and then in CfgVehicles I have this, in the "UserActions" part) :

...

class OpenGate
{
        displayName="Open Gates";
        position="posa";
        radius=10;
        condition="this animationPhase ""Door_a"" < 0.5";
        statement="this say ""TMB_House04door""; this animate ...(bla-bla)";
};


But still, there's no frikkin sound?!  ???

Is this because my house is not a vehicle? Can't we add sound FX to buildings/doors  ???


P.S.

 I've also tried to add the following to the UserAction (replacing the example above) :

class OpenGate
{
        displayName="Open Gates";
        position="posa";
        radius=10;
        sound[]={"\TMB_HMGF\door.ogg",db+6,1};
        condition="this animationPhase ""Door_a"" < 0.5";
        statement="this animate ...(bla-bla)";
};

not that it worked any better though.
Could someone plz tell me the diff. between these two examples, and can it be done at all ?!

thx m8s  :-*

Title: Re:cpp prob. animation sound ?
Post by: Tomb on 27 Apr 2003, 03:00:45


           neah  ???




Title: Re:cpp prob. animation sound ?
Post by: Leone on 28 Apr 2003, 07:55:21
Ummmm everything is a vehicle....sort of. What exactly is your building class defined as?

Anyway:

soundEnabled=1; somewhere in the animsCFG might help...maybe  :-\

Also should this:

sound[]={"\TMB_HMGF\door.ogg",db+6,1};

be this:

nameSound[]={"\TMB_HMGF\door.ogg",db+6,1};

?? I don't really know...I'm such a config n00b myself.
Title: Re:cpp prob. animation sound ?
Post by: Tomb on 28 Apr 2003, 12:50:13
Well, 'twas my bad  :-X ;D

See, I used the wrong sound file and forgot to save it as it should be.
Once I changed the SFX file to the usual .WAV settings everything worked fine.

Just in case anyone's interested, the correct cpp stuff is this:


        statement="this say ""TMB_House04door""; this animate ...(bla-bla)";


and my doors creek like hell  8) ;D