Jump to content
Sign in to follow this  
mad_cheese

Declare vanilla sounds in config.cpp

Recommended Posts

I am not sure if I am misunderstanding the concept...

 

I have cfgSounds declared in a hpp file and I include it in the config cpp, but I can not hear them in game after packing and running the addon.

 

config.cpp:

#include "cfgsounds.hpp"

cfgSounds.hpp:

class CfgSounds
{
    sounds[] = {};
    class MCSS_C2_StayAlert
    {
        name = "Stay Alert";
        // start path to sound file in AddOn with @
        sound[] = {"@a3\dubbing_radio_f\data\Male01\RadioProtocolENG\Stealth\100_Commands\StayAlert.ogg", 0.8, 1};
        titles[] = {0,""};
    }; 
    // more sounds
};

When I am testing my scripts before compiling the addon and I #include the cfgSounds.hpp file in the description.ext, everything works. Once I pack and run the addon however, the sounds can not be heard, but there is no error message and the sounds do show up in the config viewer under cfgSounds. I then included the A3 sound addon in the required mods of my cfgPatches, but that also did not fix the issue.

class CfgPatches
{
        class CCOREM
        {
                units[] = {};
                weapons[] = {};
                requiredVersion = 0.1;
                requiredAddons[] = {"CBA_Extended_EventHandlers","A3_Dubbing_Radio_F"}; // does not help
                projectName = "C2 - Command And Control";
                author = "Mad_Cheese";            
        };
};

I looked at the default Arma 3 structure, they did not have the @ that was stated as required HERE, so I tried that too but as expected pboProject refused to pack the addon because it could not locate those files.

 

What am I doing wrong? thank you for your help :)

Share this post


Link to post
Share on other sites

The @ is a particularity of the mission config (description.ext) and works only from there. From the config file (config.cpp, from a pbo), removing the @ should fix the issue ;)

Share this post


Link to post
Share on other sites

The @ is a particularity of the mission config (description.ext) and works only from there. From the config file (config.cpp, from a pbo), removing the @ should fix the issue ;)

 

oh wow.. would that mean there's a conflict with pboProject? if I remove the @, it refuses to pack the addon because it can't locate the file

 

pboproject error log:

#uninclude

#include "cfgsounds.hpp"

class CfgSounds

{

sounds[] = {};

class MCSS_C2_StayAlert

{

name = "Stay Alert";

// start path to sound file in AddOn with @

sound[] = {"a3\dubbing_radio_f\data\Male01\RadioProtocolENG\Stealth\100_Commands\StayAlert.ogg", 0.8, 1};

titles[] = {};

};

};

Warning: rapWarning: **********missing file(s)***************

Warning: CCOREM\cfgsounds.hpp Line 8: a3\dubbing_radio_f\data\Male01\RadioProtocolENG\Stealth\100_Commands\StayAlert.ogg

rapWarning: **********missing file(s)***************

 

 

EDIT: I AM SO SORRY, DISREGARD MY LAST. There's an option to check file references within pboProject that I had ticked on, it somehow recognizes the sounds as falsely declared. I will just hope that it is okay, I unticked it, the build worked and the sounds are audible. Still, thanks Tom, it would not have worked anyways with that @ :)

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  

×