Results 1 to 7 of 7

Thread: Addon based cfgSounds, what's the prerequisite?

  1. #1

    Addon based cfgSounds, what's the prerequisite?

    Hi

    Trying to make my first addon from scratch, which uses a script to create some triggers that play sounds. However, the first entry of setSoundEffect have to play a dummy sound in order to not get an error message.

    When doing it for missions, I simply put this in Description.ext:
    Code:
    class CfgSounds {
    	sounds[] = {};
    	class BiB_VRS_NoSound {name = "BiB_VRS_NoSound";sound[] = {"", 0, 1};titles[] = {};}; //Dummy sound needed for setSoundEffect command, due to stupid bug in engine.
    };
    But in addon I'm getting "sound BiB_VRS_NoSound not found".The other sounds (CfgSFX based) shows up in editor trigger list as expected, but the NoSound definition doesn't show up anywhere. I think I'm missing some kind of addon prerequisite. The addon (scripts and sound trigger movement) works, except for that annoying error message, which I'm trying to get rid of.

    The quick question is: How do you create an addon that defines CfgSounds? Example needed, I'm a total noob wrt addon making
    Regards
    Carl Gustaffa - left this game due becoming Steam Exclusive

  2. #2
    Ehh, nobody knows this?

  3. #3
    remember it goes outside the confines of any cfgvehicles if you have it in your .cpp

    otherwise i think this will work.
    Code:
    class CfgSounds {
    	class BiB_VRS_NoSound  {
    		sound[] = {"", 0, 1, 0};
    		titles[] = {};
    	};	
    };

  4. #4
    Got it working, thanks. I'm pointing to actual files with nothing in them though, in case it matters. What do you mean by
    "remember it goes outside the confines of any cfgvehicles if you have it in your .cpp"?
    Does it replace anything without "required addon" and dependencies set? If so, what am I missing? I'm not getting the error messages anymore, but I'm also not seeing the sound name. So I added name = "something" and they showed up in the list. But now (maybe also before) I'm getting messages like:
    String STR_DN_biggameclose not found
    String STR_DN_biggamedistant not found
    String STR_DN_FACTORY01 not found
    String STR_DN_FACTORY2 not found
    ... (and all the other vanilla factory sounds, some of which are placed automatically by the addon)...
    whenever I make use of the trigger effect list in the editor. the first two (biggame) puzzles me, as they're not used as island sounds for Takistan (only Chernarus/Utes), although I suspect the error is mine. But the factories? I haven't touched anything there. Does what I do affect them somehow? Haven't checked yet if they show up also without my addon in use though.

    Thanks for the assistance, at least got rid of thousands of lines of error spamming

  5. #5
    Are these missing strings from your sounds or vanilla

    It usually bad inheritance that causes these things or bad override of class.

  6. #6
    The biggame ones are my own sounds (looking into that right now), but the factory ones are default.

  7. #7
    Gunnery Sergeant Feint's Avatar
    Join Date
    Sep 9 2008
    Location
    Chicago, IL, USA
    Posts
    517
    I don't know if this will help you or not, but for my Raven mod, this is how I'm using sounds:

    Basically, I have at least two files:
    • config.cpp which defines classnames, volume, etc for sounds
    • whatever.sqf file that calls the sounds by their classnames
    I've had best results using "say" as I can control the volume in the config (not the real volume, but how far the sound "spreads" out from the source)

    config.cpp:
    Code:
    class CfgSounds
    {
            // List of sounds (to appear in triggers)
            /* NOTE - I HAVE DISABLED THIS LINE AS IT WAS DISABLING THE SOUNDS FROM PLAYING FOR SOME REASON */
            // sounds[] = {propBuzz,antiTamper,watchBeep_alarm,propBuzz2,prop_startup,addTime};
            
            // Definition for each sound
            class propBuzz
            {
                    name = "propBuzz"; // Name for mission editor
                    sound[] = {\raven\sounds\propBuzz.ogg, db-25, 1.0};
                    titles[] = {0, ""};
            };
            
            class antiTamper
            {
                    name = "antiTamper"; // Name for mission editor
                    sound[] = {\raven\sounds\antiTamper.ogg, db-15, 1.0}; // db-15 spreads a little farther than db-25 as it was hard to hear over the engine noise
                    titles[] = {0, ""};
            };
            
            class watchBeep_alarm
            {
                    name = "watchBeep_alarm"; // Name for mission editor
                    sound[] = {\raven\sounds\watchBeep_alarm.ogg, db-25, 1.0};
                    titles[] = {0, ""};
            };
            class propBuzz2
            {
                    name = "propBuzz2"; // Name for mission editor
                    sound[] = {\raven\sounds\propBuzz2.ogg, db-25, 1.0};
                    titles[] = {0, ""};
            };
            class prop_startup
            {
                    name = "prop_startup"; // Name for mission editor
                    sound[] = {\raven\sounds\prop_startup.ogg, db-25, 1.0};
                    titles[] = {0, ""};
            };
             class addTime
            {
                    name = "addTime"; // Name for mission editor
                    sound[] = {\raven\sounds\addTime.ogg, db-25, 1.0};
                    titles[] = {0, ""};
        };
            
    };
    Here's a script that plays the engine sound for the Raven while it is in flight:

    mavSoundOn.sqf:
    Code:
    private ["_microAirVehicle"];
    _microAirVehicle = _this;
    
    
    while {mavSoundOn == 1} do
    {
            _microAirVehicle say ["propBuzz2",1]; // I AM CALLING THE CLASSNAME OF THE SOUND DIRECTLY - NOT A STRING
            sleep 0.9980; // WAS 0.9984
    };




Similar Threads

  1. Is it possible to make a Warfare building Addon based on templates ?
    By TigerForce in forum ARMA 2 & OA : ADDONS - Configs & Scripting
    Replies: 3
    Last Post: Mar 9 2012, 08:57
  2. Config based addon
    By Tankbuster in forum ARMA 2 & OA : ADDONS - Configs & Scripting
    Replies: 4
    Last Post: Sep 30 2010, 23:04
  3. playSound, say, cfgSounds
    By Dr_Eyeball in forum ARMA - MISSION EDITING & SCRIPTING
    Replies: 4
    Last Post: Mar 17 2008, 02:18
  4. Will cfgsfx and cfgsounds etc work in an addon pbo
    By tracy_t in forum OFP : CONFIGS & SCRIPTING
    Replies: 2
    Last Post: Jan 15 2004, 15:16
  5. Campaign based on rangers-addon is looking for...
    By rangersattack-che in forum ADDONS & MODS: COMPLETE
    Replies: 0
    Last Post: Mar 13 2002, 11:53

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •