Jump to content
pttn40

Trouble with creating a sensor template

Recommended Posts

I have been playing around with the new sensor system a bit to try to get a feel for how it works. I want to make a small library of radar templates based on real radars that can be applied to vehicles. I made a test template that would bring the range of the cheetah down from 9000m to 5000m. When I try to override the active radar of the cheetah it defaults back to the original radar. I am not sure if this is because I simply cant override the existing radar by inheriting a template or because my template is set up wrong.

 

config.cpp for my test templates

class CfgPatches
{
    class Test_Sensors
    {
        units[] = {};
        weapons[] = {};
        requiredVersion = 0.1;
        requiredAddons[] = {};
        author = "Pttn40"
        authors[] = {"Pttn40"};
    };
};

class SensorTemplateActiveRadar;

class Test_TestRadar : SensorTemplateActiveRadar
{
    class AirTarget
    {
        minRange = 5000;
        maxRange = 5000;
        objectDistanceLimitCoef=-1;
		viewDistanceLimitCoef=-1;
    };
    class GroundTarget
    {
        minRange = 5000;
        maxRange = 5000;
        objectDistanceLimitCoef=-1;
		viewDistanceLimitCoef=-1;
    };

    typeRecognitionDistance = 5000;
    angleRangeHorizontal=360;
    angleRangeVertical=100;
    aimDown=-45;
    minSpeedThreshold=30;
    maxSpeedThreshold=90;
    minTrackableATL = 25;
    maxTrackableATL = 3500;
};

 

config.cpp for overriding the cheetah 

class CfgPatches
{
    class Test_AAIFVTest
    {
        units[] = {};
        weapons[] = {};
        requiredVersion = 0.1;
        requiredAddons[] = {"A3_Armor_F_Beta", "Test_Sensors"};
        author = "Pttn40"
        authors[] = {"Pttn40"};

        addonRootClass = "A3_Armor_F_Beta";
    };
};

class Components;
class Test_TestRadar;
class CfgVehicles 
{
    class B_APC_Tracked_01_base_F;
    class B_APC_Tracked_01_AA_F : B_APC_Tracked_01_base_F
    {
        displayName = "Test AA";

       class Components : Components
		{
			class SensorsManagerComponent
			{
				class Components
				{
					class ActiveRadarSensorComponent : Test_TestRadar
					{};
				};
			};
		};
    };
};

 

Does anyone know if this is because of an issue with how I have the configs set up, or if it is because I am simply not allowed to override the existing ActiveRadarSensorComponent through inheritance? 

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

×