Jump to content
Sign in to follow this  
zwobot

Solved: Use class of another addon

Recommended Posts

Problem solved, the scope of the unit's class was not set to public so it could not show-up in the mission editor :down:

Hi community

 

is there a way to use a class defined in CfgVehicles of one addon file as a base class in a separate addon file?

 

E. g. First .pbo's config:

 

...

class CfgVehicles
{
    class All {};
    class AllVehicles: All {};
    class Land: AllVehicles {};
    class LandVehicle: Land {};
    class Tank: LandVehicle {};
    class M60: Tank {};

    class abc_Tank
    {
        ...
    };
};

When I load both addons there are no error messages, but the second vehicle is not selectable in the editor and it also does not appear when I try to create it with createUnit:

 

...

class CfgVehicles
{
    class All {};
    class AllVehicles: All {};
    class Land: AllVehicles {};
    class LandVehicle: Land {};
    class Tank: LandVehicle {};
    class M60: Tank {};
    class abc_Tank: M60 {};

    class xyz_Tank: abc_Tank
    {
    	scope = 1;
        name="Test unit";
        vehicleClass="Test class";
        ...
    };
};

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  

×