Jump to content
Sign in to follow this  
tracy_t

Will cfgsfx and cfgsounds etc work in an addon pbo

Recommended Posts

Dear all

I have looked at config190.cpp and found the followin g interesting classes:

CfgEnvSounds, CfgSfx and cfgSounds

These classes look like what I need for my (yawn) zombie mod, to add sound.

Can I declare these classes in an addon's config.cpp and have them available from the SAY statement, triggers, etc?

If no-one provides me with an answer within the next day or so, I'll dig into it meself smile_o.gif

Share this post


Link to post
Share on other sites

Absolutely..an example from my Corsair F4U extra sounds:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

class Cfgsounds

{

class CorstartEngine

{

name = "$STR_CFG_SOUNDS_Corstartengine";

sound[] = {\iegf4u\engstart.wav, db-30, .5};

titles[]={};

};

       class Corwinjection

{

name = "$STR_CFG_SOUNDS_Corwinjection";

sound[] = {\iegf4u\winject.wav, db-10, .2};

titles[]={};

};

};

You could for example: make a soundpack with just a pbo with some sounds in it and a config.cpp consisting of just the cfgsounds

Also depending on how you will call the sounds

Just put the sounds in a unique named directory (will be the name of the addon after)

I am not that familiar with cfgenvsounds and cfgsfx but I assume they work the same

edit: heres an example of me calling that sound from a script

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

_plane = _this select 0

? isengineon _plane : _plane say "Corstartengine"

Share this post


Link to post
Share on other sites

Thank you, when I resume working on the zombie mod on Saturday, this will save me a lot digging smile_o.gif

Best regards,

Scott.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×