Jump to content
Sign in to follow this  
chronicsilence

Adding content to an existing class in the Mission Config

Recommended Posts

Hey folks,

 

I'm trying to figure out if it's possible to add content to an existing class in the mission config (note: NOT ADDON). In theory it would look something like this:

class CfgFunctions {    class My_Functions
    {
        tag = "myfuncs";
        class More_Functions
        {
            file = "functions";
            class myfunction{};
        };
    };
};

class CfgFunctions : CfgFunctions {    class More_Functions
    {
        tag = "morefuncs";
        class More_Functions
        {
            file = "more_functions";
            class anotherfunction{};
        };
    };
};

So then in the end, the mission would contain both "myfuncs_fnc_myfunction" AND "morefuncs_fnc_anotherfunction". I'm trying to do this because I have assembled a pack for people to include in their missions, and I want to easily add the pack's content to what's already existing in their mission. It's not just functions, but custom sounds, RscTitles, etc., all of which need to be in a class that the user may have already defined in their mission.

 

Any thoughts on how to add some content to an existing class? And it would need to be in a way that doesn't fail if that class hasn't been defined.

 

Thanks!

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  

×