Jump to content
Dex.

Help with reflectors

Recommended Posts

Hello.
I have a few question that maybe some of you have an answer for, i'll start with explaning with what im trying to do.

 

I'm trying to make some sort of auxiliary lights for my car model and what i want to do is making the lights to only turn on when i use the useractions menu. The lights are working like any other reflectors at the moment when i hit "L" key for the lights thats when all lights turns on.

I have set a few things up allready like AnimationSources , in the model.cfg , useractions , vehicle model memory / selection. But it sems that i must be missing something because i do get the option ingame on the scrollwheel menu to turn them on but nothing happens. Down below i will type the parts of the config and model.cfg that has to do with the lights. So i have two reflectors that i want to be turnd on/off at the same time.

 

I really hope some one can help me with this because i been trying everything for the couple of days with no results.

 

"For the admins reading this please move this topic if it's in the wrong forums, it is my first time making one".

/Thanks for reading.

Config:
 

Spoiler

            class auxiliarylights
            {
                color[] = {7000,7500,10000};
                ambient[] = {70,75,100};
                intensity = 15;
                size = 1;
                innerAngle = 90;
                outerAngle = 169;
                coneFadeCoef = 10;
                position = "auxiliarylights_pos";
                direction = "auxiliarylights_dir";
                hitpoint = "auxiliarylights_hitpoint";
                selection = "auxiliarylights";
                useFlare = 1;
                dayLight = 1;
                flareSize = 6;
                flareMaxDistance = 250;
                class Attenuation
                {
                    start = 0;
                    constant = 0;
                    linear = 1;
                    quadratic = 1;
                    hardLimitStart = 150;
                    hardLimitEnd = 350;
                };
            };
            class auxiliarylights1: auxiliarylights
            {
                position = "auxiliarylights1_pos";
                direction = "auxiliarylights1_dir";
                hitpoint = "Fauxiliarylights1_hitpoint";
                selection = "auxiliarylights1";
                FlareSize     = 6;
            };
        };
        aggregateReflectors[] = {{"LightCarHeadL01", "LightCarHeadR01", "auxiliarylights", "auxiliarylights1", ""}};

 

 ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////  Not in config i just added them here on the website  so it's not a mess

 

        class AnimationSources: AnimationSources
        {

            class auxiliarylights_on
            {
                source = "user";
                animPeriod = 0.001;
                initPhase = 0;
            };
            class auxiliarylights1_on
            {
                source = "user";
                animPeriod = 0.001;
                initPhase = 0;
            };
        };

 

 

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 

 

        class UserActions
        {
            class auxiliarylights_on
            {
                displayName = "<t color='#193c65'>Full Lights ON</t>";
                displayNameDefault = "";
                position = "drivewheel_axis";
                radius = 1;
                onlyForPlayer = 1;
                condition = "this animationPhase ""auxiliarylights"" < 0.5 AND Alive(this)  AND driver this == player";
                statement = "this animate [""auxiliarylights"",1];";
                showWindow = 0;
                shortcut = "LeanLeft";
            };
            class auxiliarylights_off
            {
                displayName = "<t color='#132d4c'>full Lights OFF</t>";
                displayNameDefault = "";
                position = "drivewheel_axis";
                radius = 1;
                onlyForPlayer = 1;
                condition = "this animationPhase ""auxiliarylights_on"" > 0.5 AND Alive(this)  AND driver this == player";
                statement = "this animate [""auxiliarylights_on"",0];";
                showWindow = 0;
                shortcut = "LeanLeft";
            };

 

 

model.Cfg

 

Spoiler

            class auxiliarylights_on
            {
                type="hide";
                source="auxiliarylights";
                selection="auxiliarylights";
//              sourceAddress = clamp;// (default)
                minValue = -1.0;//rad -45.836624
                maxValue = 0.5;//rad 11.459156
                hideValue = 0.5;
                unHideValue = 1.0;
                animPeriod = 0.0;
                initPhase = 0.0;
            };
            class auxiliarylights_off
            {
                type="hide";
                source="time";
                selection="auxiliarylights";
                sourceAddress = loop;
                minValue = -0.5;//rad -45.836624
                maxValue = 0.5;//rad 11.459156
                hideValue = 0.5;
//              unHideValue = -1.0;//(default)
                animPeriod = 0.0;
                initPhase = 0.0;
            };
            class auxiliarylights1_on
            {
                type="hide";
                source="auxiliarylights1";
                selection="auxiliarylights1";
//              sourceAddress = clamp;// (default)
                minValue = -1.0;//rad -45.836624
                maxValue = 0.5;//rad 11.459156
                hideValue = 0.5;
                unHideValue = 1.0;
                animPeriod = 0.0;
                initPhase = 0.0;
            };
            class auxiliarylights1_off
            {
                type="hide";
                source="time";
                selection="auxiliarylights1";
                sourceAddress = loop;
                minValue = -0.5;//rad -45.836624
                maxValue = 0.5;//rad 11.459156
                hideValue = 0.5;
//              unHideValue = -1.0;//(default)
                animPeriod = 0.0;
                initPhase = 0.0;
            };

 

Share this post


Link to post
Share on other sites

I might be forgetting something, but I'm fairly sure class Reflectors only activate when the driver switches the lights on at night. "L"

You can still use a UserAction to turn on/off specific lights, but nothing happens before the driver turns on the main lights first.

The only thing you can do for daytime lights is look at using the Marker and Beacon classes, along with emissive object textures, but they don't provide a reflective light that shines off other surfaces.

Don't forget to add your lights to the Sections area of model.cfg.

You can take a look at how I did it for the Land Rover Ambulance blue lights, or the Snatch searchlight in the 3CB BAF Vehicles mod pack.



Share this post


Link to post
Share on other sites

Thank you for your answer. I will take a look and see of i can find something :)

Share this post


Link to post
Share on other sites

So far no luck what so ever i just dont know what to accualy put inside the model.cfg for the reflectors to turn off and on with the useraction menu.
I dont know what i need to have inside the Source that tells the reflectors what to do :(

Share this post


Link to post
Share on other sites

You might need to post your full config.cpp and model.cfg to get more detailed assistance.

Share this post


Link to post
Share on other sites

It's kind of ridiculous how "dayLight = 1;" seemingly does absolutely nothing, especially when the BIS test_car_01 comment for that config line implies it does turn on lights at the expense of CPU. At the very least it should allow the flare and the lit bulb to be visible.

Share this post


Link to post
Share on other sites

Here is the config and model.cfg :)

Config:

Spoiler

#include "basicdefines_A3.hpp"
class DefaultEventhandlers;

#include "CfgPatches.hpp"

class AnimationSources;
class EventHandlers;
class WeaponFireGun;
class WeaponCloudsGun;
class WeaponFireMGun;
class WeaponCloudsMGun;

class CfgSounds
{
    class policesiren
    {
        name = "policesiren";
        sound[] = {"nVts_eclipse\sound\police\wail.ogg",1,1};
        titles[] = {};
        scope = 2;
        reloadTime = 4;
    };
    class normalHorn
    {
        name = "Car horn";
        sound[] = {"nVts_eclipse\sound\horn.ogg",1,1};
        titles[] = {};
        scope = 2;
        reloadTime = 4;
    };
    class policesiren2
    {
        name = "policesiren 2";
        sound[] = {"nVts_eclipse\sound\police\yelp.ogg",1,1};
        titles[] = {};
        scope = 2;
        reloadTime = 4;
    };
};
class cfgWeapons
{
    class SportCarHorn;
    class car_horn: SportCarHorn
    {
        displayname = "Horn";
        reloadTime = 2;
        drySound[] = {"nVts_eclipse\sound\horn.ogg",1,1};
        scope = 2;
    };
    class police_takedown: SportCarHorn
    {
        displayname = "Takedown";
        reloadTime = 4;
        drySound[] = {"nVts_eclipse\sound\police\horn\takedown.wss",1,1};
        scope = 2;
    };
    class police_airhorn: SportCarHorn
    {
        displayname = "Airhorn";
        reloadTime = 4;
        drySound[] = {"nVts_eclipse\sound\police\wail.ogg",1,1};
        scope = 2;
    };
    class police_priority: SportCarHorn
    {
        displayname = "priority";
        scope = 2;
        reloadTime = 4;
        drySound[] = {"nVts_eclipse\sound\police\yelp.ogg",0.5,1};
    };
};
class CfgVehicles
{
    class Car;
    class Car_F: Car
    {
        class HitPoints /// we want to use hitpoints predefined for all cars
        {
            class HitLFWheel;
            class HitLF2Wheel;
            class HitRFWheel;
            class HitRF2Wheel;
            class HitFuel;
            class HitEngine;
            class HitBody;
            class HitGlass1;
            class HitGlass2;
            class HitGlass3;
            class HitGlass4;
            class HitGlass5;
        };
        class EventHandlers{};
    };
    class nVts_Eclipse_Base: Car_F
    {
        model     = "\nVts_Eclipse\nVts_Eclipse";  /// simple path to model
        picture = "\nVts_Eclipse\data\portrait_car_CA.paa";
        Icon    = "\nVts_Eclipse\data\map_car_CA.paa";
        weapons[] = {"car_horn","police_takedown","police_airhorn","police_priority"};
        extCameraPosition[] = {0,1,-8};
        ejectDeadDriver = 1;
        ejectDeadCargo = 1;
        hideWeaponsDriver = 1;
        hideWeaponsCargo = 1;
        slingLoadCargoMemoryPoints[] = {"SlingLoadCargo1","SlingLoadCargo2","SlingLoadCargo3","SlingLoadCargo4"};
        displayName = "Volvo xc70 - Police"; /// displayed in Editor

        driverAction = "driver_offroad01";
        driverInAction = "";
        cargoAction[] = {"passenger_low01","passenger_generic01_leanleft","passenger_generic01_foldhands"};
        cargoInAction[] = {"GetInLow"};

        memoryPointsGetInDriver = "pos driver";
        memoryPointsGetInDriverDir = "pos driver dir";
        memoryPointsGetInCargo[] = {"pos cargo 1","pos cargo 2","pos cargo 3"};
        memoryPointsGetInCargoDir[] = {"pos cargo 1 dir","pos cargo 2 dir","pos cargo 3 dir"};

        hiddenSelections[] = {"", "", ""}; ///we want to allow changing the color of this selection

        terrainCoef     = 2;     /// different surface affects this car more, stick to tarmac
        turnCoef         = 3;     /// should match the wheel turn radius
        precision         = 10;     /// how much freedom has the AI for its internal waypoints - lower number means more precise but slower approach to way
        brakeDistance     = 3.0;     /// how many internal waypoints should the AI plan braking in advance
        acceleration     = 15;     /// how fast acceleration does the AI think the car has

        fireResistance     = 5;     /// lesser protection against fire than tanks
        armor             = 65;
        cost            = 50000; /// how likely is the enemy going to target this vehicle

        transportMaxBackpacks     = 4; /// just some backpacks fit the trunk by default
        transportSoldier         = 3; /// number of cargo except driver

        /// some values from parent class to show how to set them up
        wheelDamageRadiusCoef     = 0.9;             /// for precision tweaking of damaged wheel size
        wheelDestroyRadiusCoef     = 0.4;            /// for tweaking of rims size to fit ground
        maxFordingDepth         = 0.5;            /// how high water would damage the engine of the car
        waterResistance         = 1;            /// if the depth of water is bigger than maxFordingDepth it starts to damage the engine after this time
        crewCrashProtection        = 0.25;            /// multiplier of damage to crew of the vehicle => low number means better protection
        driverLeftHandAnimName     = "drivewheel"; /// according to what bone in model of car does hand move
        driverRightHandAnimName = "drivewheel";    /// beware, non-existent bones may cause game crashes (even if the bones are hidden during play)

        class TransportItems {};
        class Turrets{}; /// doesn't have any gunner nor commander
        class HitPoints: HitPoints
        {
            class HitLFWheel: HitLFWheel
            {
                armor = 0.125;
                passThrough = 0;
            };
            class HitLF2Wheel: HitLF2Wheel
            {
                armor = 0.125;
                passThrough = 0;
            };
            class HitRFWheel: HitRFWheel
            {
                armor = 0.125;
                passThrough = 0;
            };
            class HitRF2Wheel: HitRF2Wheel
            {
                armor = 0.125;
                passThrough = 0;
            };
            class HitFuel: HitFuel
            {
                armor = 0.5;
                material = -1;
                passThrough = 0.2;
            };
            class HitEngine: HitEngine
            {
                armor = 0.5;
                material = -1;
                passThrough = 0.2;
            };
            class HitBody: HitBody
            {
                passThrough = 1;
            };
            class HitGlass1: HitGlass1
            {
                armor = 0.05;
                passThrough = 1;
            };
            class HitGlass2: HitGlass2
            {
                armor = 0.05;
                passThrough = 1;
            };
            class HitGlass3: HitGlass3
            {
                armor = 0.05;
                passThrough = 1;
            };
            class HitGlass4: HitGlass4
            {
                armor = 0.05;
                passThrough = 1;
            };
            class HitGlass5: HitGlass5
            {
                armor = 0.05;
                passThrough = 1;
            };
        };

        getInAction         = GetInLow;         /// how does driver look while getting in
        getOutAction         = GetOutLow;         /// and out

        #include "sounds.hpp"    /// sounds are in a separate file to make this one simple
        #include "pip.hpp"        /// PiPs are in a separate file to make this one simple
        #include "physx.hpp"    /// PhysX settings are in a separate file to make this one simple

        class PlayerSteeringCoefficients
        {
            turnIncreaseConst = 1.0;
            turnIncreaseLinear = 3.0;
            turnIncreaseTime = 0.0;
            turnDecreaseConst = 8.0;
            turnDecreaseLinear = 0.0;
            turnDecreaseTime = 0.0;
            maxTurnHundred = 1.0;
        };

        /// memory points where do tracks of the wheel appear
        // front left track, left offset
        memoryPointTrackFLL = "TrackFLL";
        // front left track, right offset
        memoryPointTrackFLR = "TrackFLR";
        // back left track, left offset
        memoryPointTrackBLL = "TrackBLL";
        // back left track, right offset
        memoryPointTrackBLR = "TrackBLR";
        // front right track, left offset
        memoryPointTrackFRL = "TrackFRL";
        // front right track, right offset
        memoryPointTrackFRR = "TrackFRR";
        // back right track, left offset
        memoryPointTrackBRL = "TrackBRL";
        // back right track, right offset
        memoryPointTrackBRR = "TrackBRR";

        class Damage /// damage changes material in specific places (visual in hitPoint)
        {
            tex[]={};
            mat[]=
            {
                "A3\data_f\glass_veh_int.rvmat",         /// material mapped in model
                "A3\data_f\Glass_veh_damage.rvmat",     /// changes to this one once damage of the part reaches 0.5
                "A3\data_f\Glass_veh_damage.rvmat",        /// changes to this one once damage of the part reaches 1

                "A3\data_f\glass_veh.rvmat",            /// another material
                "A3\data_f\Glass_veh_damage.rvmat",        /// changes into different ones
                "A3\data_f\Glass_veh_damage.rvmat",

                "nVts_eclipse\data\Rvmats\glossy.rvmat",
                "nVts_eclipse\data\Rvmats\glossy_damage.rvmat",
                "nVts_eclipse\data\Rvmats\glossy_destruct.rvmat",

                "nVts_eclipse\data\Rvmats\metallic.rvmat",
                "nVts_eclipse\data\Rvmats\metallic_damage.rvmat",
                "nVts_eclipse\data\Rvmats\metallic_destruct.rvmat"
            };
        };

        class Exhausts /// specific exhaust effects for the car
        {
            class Exhaust1 /// the car has two exhausts - each on one side
            {
                position     = "exhaust1_pos";          /// name of initial memory point
                direction     = "exhaust1_dir";    /// name of memory point for exhaust direction
                effect         = "ExhaustEffectHTruck";    /// what particle effect is it going to use
            };

            class Exhaust2
            {
                position     = "exhaust2_pos";
                direction     = "exhaust2_dir";
                effect         = "ExhaustEffectHTruck";
            };
        };

        class Reflectors    /// only front lights are considered to be reflectors to save CPU
        {
            class LightCarHeadL01     /// lights on each side consist of two bulbs with different flares
            {
                color[]         = {7000,7500,10000};        /// approximate colour of standard lights
                ambient[]        = {70,75,100};                /// nearly a white one
                position         = "LightCarHeadL01";        /// memory point for start of the light and flare
                direction         = "LightCarHeadL01_end";    /// memory point for the light direction
                hitpoint         = "Light_L";                /// point(s) in hitpoint lod for the light (hitPoints are created by engine)
                selection         = "Light_L";                /// selection for artificial glow around the bulb, not much used any more
                size             = 1;                        /// size of the light point seen from distance
                innerAngle         = 90;
                outerAngle         = 169;                        /// angle of some light
                coneFadeCoef     = 10;                        /// attenuation of light between the above angles
                intensity         = 1;                        /// strength of the light
                useFlare         = true;                        /// does the light use flare?
                dayLight         = 0;                    /// switching light off during day saves CPU a lot
                flareSize         = 0.7;                        /// how big is the flare

                class Attenuation
                {
                    start             = 1;
                    constant         = 0;
                    linear             = 0;
                    quadratic         = 0.25;
                    hardLimitStart     = 25;        /// it is good to have some limit otherwise the light would shine to infinite distance
                    hardLimitEnd     = 60;
                };
            };
            class LightCarHeadR01: LightCarHeadL01
            {
                position     = "LightCarHeadR01";
                direction     = "LightCarHeadR01_end";
                hitpoint     = "Light_R";
                selection     = "Light_R";
            };

            class auxiliarylights
            {
                color[] = {7000,7500,10000};
                ambient[] = {70,75,100};
                intensity = 15;
                size = 1;
                innerAngle = 90;
                outerAngle = 169;
                coneFadeCoef = 10;
                position = "auxiliarylights_pos";
                direction = "auxiliarylights_dir";
                hitpoint = "auxiliarylights_hitpoint";
                selection = "auxiliarylights";
                useFlare = 1;
                dayLight = 0;
                flareSize = 6;
                flareMaxDistance = 250;
                class Attenuation
                {
                    start = 0;
                    constant = 0;
                    linear = 0;
                    quadratic = 1;
                    hardLimitStart = 150;
                    hardLimitEnd = 350;
                };
            };
            class auxiliarylights1: auxiliarylights
            {
                position = "auxiliarylights1_pos";
                direction = "auxiliarylights1_dir";
                hitpoint = "Fauxiliarylights1_hitpoint";
                selection = "auxiliarylights1";
            };
        };
        aggregateReflectors[] = {{"LightCarHeadL01", "LightCarHeadR01", "auxiliarylights", "auxiliarylights1", ""}};

        hiddenSelectionsTextures[]={
            "#(argb,8,8,3)color(0,0,0,1.0,CO)",
            "",
            "",
            "",
            "",
            "",
            "",
            ""
        };
        hiddenSelectionsMaterials[]={
            "nVts_eclipse\data\Rvmats\metallic.rvmat",
            ""
        };

        class AnimationSources: AnimationSources
        {
            class turn_left
            {
                source = "user";
                animPeriod = 0.001;
                initPhase = 0;
            };
            class turn_right: turn_left{};
            class auxiliarylights_Off
            {
                source = "user";
                animPeriod = 1;
                initPhase = 1;
            };
        };

        class UserActions
        {
            class auxiliarylights_Off
            {
                displayName = "<t color='#193c65'>Full Lights</t>";
                onlyForPlayer = 1;
                position = "drivewheel_axis";
                priority = 0.7;
                radius = 3.6;
                shortcut = "";
                showWindow = 0;
                textToolTip = "";
                condition = "(this animationSourcePhase 'auxiliarylights_Off' < 0.5) AND (isLightOn this) AND (alive this)";
                statement = "this animateSource ['auxiliarylights_Off', 1];";
            };
            class auxiliarylights_On: auxiliarylights_Off
            {
                displayName = "<t color='#193c65'>Full Lights</t>";
                condition = "(this animationSourcePhase 'auxiliarylights_Off' > 0.5) AND (isLightOn this) AND (alive this)";
                statement = "this animateSource ['auxiliarylights_Off', 0];";
            };
            class code_one
            {
                displayName = "Code One";
                displayNameDefault = "Code One";
                position = "drivewheel_axis";
                radius = 1000;
                condition = "(this animationPhase 'ARGENT_start' > 0.5) AND driver this == player";
                statement = "this animate ['ARGENT_start',0], this animate ['encender_puente',0]";
                onlyForplayer = 1;
                showWindow = 0;
            };
            class code_two
            {
                displayName = "<t color='#f5c212'>Code Two</t>";
                displayNameDefault = "Code Two";
                position = "drivewheel_axis";
                radius = 1000;
                condition = "driver this == player";
                statement = "this animate ['ARGENT_start',1], this animate ['encender_puente',1]";
                onlyForplayer = 0;
                showWindow = 0;
            };
            class code_three
            {
                displayName = "<t color='#ef1d1d'>Code Three</t>";
                displayNameDefault = "Code Three";
                position = "drivewheel_axis";
                radius = 1000;
                condition = "(this animationPhase 'ARGENT_start' < 2) AND driver this == player";
                statement = "this animate ['ARGENT_start',2], this animate ['encender_puente',2]";
                onlyForplayer = 0;
                showWindow = 0;
            };
            class LeftSignalOn
            {
                displayName = "<t color=""#ffff00"">Left Signal</t>";
                position = "drivewheel_axis";
                radius = 1;
                onlyForPlayer = 1;
                condition = "this animationPhase ""turn_left"" < 0.5 AND Alive(this) AND driver this == player";
                statement = "this animate [""turn_left"",1];";
                shortcut = "LeanLeft";
                showWindow = 0;
                hideOnUse = 0;
            };
            class LeftSignalOff
            {
                displayName = "<t color=""#ffff00"">Left Signal</t>";
                position = "drivewheel_axis";
                radius = 1;
                onlyForPlayer = 1;
                condition = "this animationPhase ""turn_left"" > 0.5 AND Alive(this) AND driver this == player";
                statement = "this animate [""turn_left"",0];";
                shortcut = "LeanLeft";
                showWindow = 0;
                hideOnUse = 0;
            };
            class RightSignalOn
            {
                displayName = "<t color=""#ffff00"">Right Signal</t>";
                position = "drivewheel_axis";
                radius = 1;
                onlyForPlayer = 1;
                condition = "this animationPhase ""turn_right"" < 0.5 AND Alive(this) AND driver this == player";
                statement = "this animate [""turn_right"",1];";
                shortcut = "LeanRight";
                showWindow = 0;
                hideOnUse = 0;
            };
            class RightSignalOff
            {
                displayName = "<t color=""#ffff00"">Right Signal</t>";
                position = "drivewheel_axis";
                radius = 1;
                onlyForPlayer = 1;
                condition = "this animationPhase ""turn_right"" > 0.5 AND driver this == player";
                statement = "this animate [""turn_right"",0];";
                shortcut = "LeanRight";
                showWindow = 0;
                hideOnUse = 0;
            };
        };
    };
    // Derivate from the base class
    class nVts_Eclipse: nVts_Eclipse_Base /// some class that is going to be visible in editor
    {
        author    = "Dex";
        vehicleClass="nVts";
        scope    = 2;             /// makes the car visible in editor
        scopeCurator=2;            // scope 2 means it's available in Zeus mode (0 means hidden)
        crew     = "C_man_1";     /// we need someone to fit into the car
        side    = 3;             /// civilian car should be on civilian side
        faction    = CIV_F;        /// and with civilian faction
    };
};

 

 

 

Model.Cfg:

 

Spoiler

class Rotation
{
    type = "rotation";
    memory = 1;
    minValue = 0;
    maxValue = 1;
    angle0 = 0;
    angle1 = 1;
};
class cfgSkeletons
{
    class eclipse
    {
        skeletonInherit="";
        isDiscrete=1;
        SkeletonBones[]=
        {
            "drivewheel","",

            "wheel_1_1_damper_land","",
            "wheel_1_2_damper_land","",
            "wheel_1_3_damper_land","",
            "wheel_1_4_damper_land","",

            "wheel_2_1_damper_land","",
            "wheel_2_2_damper_land","",
            "wheel_2_3_damper_land","",
            "wheel_2_4_damper_land","",

            "wheel_1_1_damper","wheel_1_1_damper_land",
            "wheel_1_2_damper","wheel_1_2_damper_land",
            "wheel_1_3_damper","wheel_1_3_damper_land",
            "wheel_1_4_damper","wheel_1_4_damper_land",

            "wheel_2_1_damper","wheel_2_1_damper_land",
            "wheel_2_2_damper","wheel_2_2_damper_land",
            "wheel_2_3_damper","wheel_2_3_damper_land",
            "wheel_2_4_damper","wheel_2_4_damper_land",

            "wheel_1_1_steering","wheel_1_1_damper",
            "wheel_1_2_steering","wheel_1_2_damper",
            "wheel_1_3_steering","wheel_1_3_damper",
            "wheel_1_4_steering","wheel_1_4_damper",

            "wheel_2_1_steering","wheel_2_1_damper",
            "wheel_2_2_steering","wheel_2_2_damper",
            "wheel_2_3_steering","wheel_2_3_damper",
            "wheel_2_4_steering","wheel_2_4_damper",

            "wheel_1_1","wheel_1_1_steering",
            "wheel_1_2","wheel_1_2_steering",
            "wheel_1_3","wheel_1_3_steering",
            "wheel_1_4","wheel_1_4_steering",

            "wheel_2_1","wheel_2_1_steering",
            "wheel_2_2","wheel_2_2_steering",
            "wheel_2_3","wheel_2_3_steering",
            "wheel_2_4","wheel_2_4_steering",

            "wheel_1_1_unhide","wheel_1_1",
            "wheel_1_2_unhide","wheel_1_2",
            "wheel_1_3_unhide","wheel_1_3",
            "wheel_1_4_unhide","wheel_1_4",

            "wheel_2_1_unhide","wheel_2_1",
            "wheel_2_2_unhide","wheel_2_2",
            "wheel_2_3_unhide","wheel_2_3",
            "wheel_2_4_unhide","wheel_2_4",

            "wheel_1_1_hide","wheel_1_1",
            "wheel_1_2_hide","wheel_1_2",
            "wheel_1_3_hide","wheel_1_3",
            "wheel_1_4_hide","wheel_1_4",

            "wheel_2_1_hide","wheel_2_1",
            "wheel_2_2_hide","wheel_2_2",
            "wheel_2_3_hide","wheel_2_3",
            "wheel_2_4_hide","wheel_2_4",

            "otocvez",
            "auxiliarylights", ,"auxiliarylights_on",
            "otochlaven",
            "otocvez",
            "damagehlaven",
            "otochlaven",
            "damagevez",
            "otocvez",
            "damagehide",
            "glass1",
            "damagehide",
            "glass2",
            "damagehide",
            "glass3",
            "damagehide",
            "glass4",
            "damagehide",
            "daylights",
            "damagehide",
            "daylights",
            "turn_left"    ,"daylights",
            "turn_right"    ,"daylights",
            "daylights",
            "ukaz_rychlo",
            "takedown",
            "ukaz_rychlo2",
            "BlueLight2",
            "ukaz_rpm",
            "BlueLight1",
            "mph",
            "BlueLight1_dir",
            "rpm",
            "BlueLight2_dir",
            "fuel",
            "takedown_axis",
            "fuel_1",
            "WhiteLightbar",
            "fuel_01",
            "WhiteLightbar_dir",
            "fuel_2",
            "fuel_3",
            "prop_01",
            "auxiliarylights_on", "auxiliarylights1_on",
            "prop_02",
            "lightbar_glass",
            "prop_2",
            "lightbar_lights",
            "prop_1",
            "lightbar_top",
            "reverse_light", "daylights",
            "turn_left_hide"    ,"",
            "turn_right_hide"    ,"",
            "fullLights_on",
            "dummy",
            "fullLights_off",
            "lightbar_top",
            "extraLights1",
            "lightbar_front",
            "extraLights2",
            "lightbar_back",
            "extraLights2_off",
            "cage",
            "extraLights1_off",
            "directional",
            "fullLights1_on",
            "rambar",
            "fulllights1_off",
            "fulllights2_off",
            "fulllights2_on",
            "radar",
            "auxiliarylights1_pos",
            "auxiliarylights1_dir",
            "auxiliarylights1_hitpoint",
            "",
            "",
            "",
            "",
            "",
            "",
            "",

            ""
        };
    };
};
class CfgModels
{
    class Default
    {
        sections[]={};
        sectionsInherit="";
        skeletonName="eclipse";
    };
    class nVts_eclipse: Default
    {
        skeletonName="eclipse";
        sections[]=
        {
            "glass3",
            "glass4",
            "glass2",
            "glass1",
            "light_l",
            "light_r",
            "body",
            "camo1",
            "podsvit pristroju",
            "lb-front-red-1",
            "target1",
            "target2",
            "target3",
            "lock1",
            "lock2",
            "lock3",
            "patrol1",
            "patrol2",
            "patrol3",
            "lb-front-red-2",
            "lb-right-front-corner",
            "spz",
            "brzdove svetlo",
            "zadni svetlo",
            "camo3",
            "camo2",
            "camo4",
            "grill",
            "auxiliarylights_on",
            "black",
            "auxiliarylights",
            "brakedisk",
            "chrome",
            "siren_lights",
            "windows_clear",
            "windows_smoked",
            "lb-front-blue-1",
            "lb-front-blue-2",
            "lb-back-blue-1",
            "lb-back-blue-2",
            "lb-back-blue-3",
            "lb-right-back-corner",
            "lb-back-red-1",
            "lb-back-red-2",
            "lb-back-red-3",
            "lb-left-back-corner",
            "lb-left-takedown",
            "lb-right-takedown",
            "lb-left-alley",
            "lb-right-alley",
            "lb-lights-front-2",
            "lb-lights-front-1",
            "lb-lights-back-1",
            "lb-lights-back-2",
            "lb-back-yellow-1",
            "lb-back-yellow-2",
            "lb-back-yellow-3",
            "lb-back-yellow-4",
            "lb-back-yellow-5"
        };
        /*<potential axis>
extraLights_on
auxiliarylights_on
fullLights_on
fullLights_off
fullLights1_on
fullLights1_off
fullLights2_on
fullLights2_off
extraLights2
extraLights1
auxiliarylights_pos
auxiliarylights
auxiliarylights1
auxiliarylights_x_axis
auxiliarylights_dir
auxiliarylights_on
auxiliarylights1_on
auxiliarylights1_pos
auxiliarylights1_dir
auxiliarylights1_hitpoint
auxiliarylights_hitpoint
extraLights1_on
extraLights1_off
extraLights2_on
extraLights2_off
wheel_1_1_damper
wheel_2_1_damper
wheel_1_2_damper
wheel_2_2_damper
glass3
glass4
glass2
glass1
fueltank
wheel_1_1_steering
wheel_1_2_steering
wheel_2_2_steering
wheel_2_1_steering
svetlo zp
svetlo zl
light_l
light_r
body
engine
wheel_1_1_axis
wheel_2_1_axis
wheel_1_2_axis
wheel_2_2_axis
slingloadcargo1
wheel_1_1_steering_axis
wheel_2_1_steering_axis
posun wheel_1_1
posun wheel_2_1
posun wheel_1_2
posun wheel_2_2
slingloadcargo2
slingloadcargo3
slingloadcargo4
exhaust1_pos
exhaust1_dir
wheel_1_1_bound
wheel_2_1_bound
wheel_1_2_bound
drivewheel_axis
wheel_2_2_bound
pip0_pos
pip0_dir
pip1_pos
lightcarheadl01
pip1_dir
pip2_pos
BlueLight1
BlueLight2
BlueLight1_dir
BlueLight2_dir
WhiteLightbar
WhiteLightbar_dir
pip2_dir
pos driver dir
pos driver
pos cargo 1
pos cargo 1 dir
pos cargo 2 dir
pos cargo 2
pos cargo 3
pos cargo 3 dir
lightcarheadr01
lightcarheadl01_end
lightcarheadr01_end
basic_damper_destruct_axis
fuel_axis
temp_axis
rpm_axis
mph_axis
trackbrl
trackbrr
trackblr
trackbll
trackfrl
trackfrr
trackflr
trackfll
wheel_1_1_hide
wheel_1_2_hide
wheel_2_2_hide
wheel_2_1_hide
dustfrontleft
dustfrontright
dustbackleft
dustbackright
doplonavi
dummy_axis
temp
camo1
fuel
rpm
mph
podsvit pristroju
drivewheel
lb-front-red-1
cage
radar
target1
target2
target3
lock1
lock2
lock3
patrol1
patrol2
patrol3
lb-front-red-2
lb-right-front-corner
lightbar_front
spz
turn_left
turn_right
reverse_light
brzdove svetlo
zadni svetlo
camo3
camo2
camo4
lb-front-blue-1
lb-front-blue-2
lb-back-blue-1
lb-back-blue-2
lb-back-blue-3
lb-right-back-corner
lb-back-red-1
lb-back-red-2
lb-back-red-3
lb-left-back-corner
lb-left-takedown
lb-right-takedown
lightbar_top
lb-left-alley
lb-right-alley
lightbar_back
mirrorlight
lb-lights-front-2
lb-lights-front-1
lb-lights-back-1
lb-lights-back-2
rambar
directional
lb-back-yellow-1
lb-back-yellow-2
lb-back-yellow-3
lb-back-yellow-4
lb-back-yellow-5
dummy
</potential axis>*/
        class Animations
        {
            // destruct START
            class damageHide
            {
                type="hide";
                source="damage";
                selection="damageHide";
                hideValue=1.0;
            };
            class damageHideVez:damageHide
            {
                selection="OtocVez";
            };
            class damageHideHlaven:damageHide
            {
                selection="OtocHlaven";
            };

            // Wheels START
            // Wheels Complete Destruct START
            class wheel_1_1_destruct
            {
                type="hide";
                selection="wheel_1_1_hide";
                source="HitLFWheel";
                minValue = 0; // upravit na 0.99
                maxValue = 1; // upravit na 1.0
                hidevalue = 0.99999;
            };
            class wheel_1_2_destruct: wheel_1_1_destruct {source="HitLBWheel";selection="wheel_1_2_hide";};
            class wheel_1_3_destruct: wheel_1_1_destruct {source="HitLMWheel";selection="wheel_1_3_hide";};
            class wheel_1_4_destruct: wheel_1_1_destruct {source="HitLF2Wheel";selection="wheel_1_4_hide";};

            class wheel_2_1_destruct: wheel_1_1_destruct {source="HitRFWheel";selection="wheel_2_1_hide";};
            class wheel_2_2_destruct: wheel_1_1_destruct {source="HitRBWheel";selection="wheel_2_2_hide";};
            class wheel_2_3_destruct: wheel_1_1_destruct {source="HitRMWheel";selection="wheel_2_3_hide";};
            class wheel_2_4_destruct: wheel_1_1_destruct {source="HitRF2Wheel";selection="wheel_2_4_hide";};

            class wheel_1_1_destruct_unhide
            {
                type="hide";
                selection="wheel_1_1_unhide";
                source="HitLFWheel";
                minValue = 0;
                maxValue = 1;
                hidevalue = 0.00000;
                UnHidevalue = 1.00000;
            };
            class wheel_1_2_destruct_unhide: wheel_1_1_destruct_unhide {source="HitLBWheel";selection="wheel_1_2_unhide";};
            class wheel_1_3_destruct_unhide: wheel_1_1_destruct_unhide {source="HitLMWheel";selection="wheel_1_3_unhide";};
            class wheel_1_4_destruct_unhide: wheel_1_1_destruct_unhide {source="HitLF2Wheel";selection="wheel_1_4_unhide";};

            class wheel_2_1_destruct_unhide: wheel_1_1_destruct_unhide {source="HitRFWheel";selection="wheel_2_1_unhide";};
            class wheel_2_2_destruct_unhide: wheel_1_1_destruct_unhide {source="HitRBWheel";selection="wheel_2_2_unhide";};
            class wheel_2_3_destruct_unhide: wheel_1_1_destruct_unhide {source="HitRMWheel";selection="wheel_2_3_unhide";};
            class wheel_2_4_destruct_unhide: wheel_1_1_destruct_unhide {source="HitRF2Wheel";selection="wheel_2_4_unhide";};

            // Wheels Complete Destruct END

            #define DamageOffset 0.2

            // Wheels Damage START
            class wheel_1_1_Damage: wheel_1_1_destruct
            {
                type="translation";
                axis="Basic_Damper_Destruct_Axis";
                memory=1;
                selection="wheel_1_1_damper";
                source="HitLFWheel";
                minValue = 0.0;
                maxValue = 1;
                offset0 = 0;
                offset1 = DamageOffset;
            };
            class wheel_1_2_Damage: wheel_1_1_Damage {source="HitLBWheel";selection="wheel_1_2_damper";};
            class wheel_1_3_Damage: wheel_1_1_Damage {source="HitLMWheel";selection="wheel_1_3_damper";};
            class wheel_1_4_Damage: wheel_1_1_Damage {source="HitLF2Wheel";selection="wheel_1_4_damper";};

            class wheel_2_1_Damage: wheel_1_1_Damage {source="HitRFWheel";selection="wheel_2_1_damper";};
            class wheel_2_2_Damage: wheel_1_1_Damage {source="HitRBWheel";selection="wheel_2_2_damper";};
            class wheel_2_3_Damage: wheel_1_1_Damage {source="HitRMWheel";selection="wheel_2_3_damper";};
            class wheel_2_4_Damage: wheel_1_1_Damage {source="HitRF2Wheel";selection="wheel_2_4_damper";};


            class wheel_1_1_Damper_Damage_BackAnim: wheel_1_1_Damage {selection="wheel_1_1_damper";offset1 = -1.2*DamageOffset;};
            class wheel_1_2_Damper_Damage_BackAnim: wheel_1_1_Damper_Damage_BackAnim {source="HitLBWheel";selection="wheel_1_2_damper";};
            class wheel_1_3_Damper_Damage_BackAnim: wheel_1_1_Damper_Damage_BackAnim {source="HitLMWheel";selection="wheel_1_3_damper";};
            class wheel_1_4_Damper_Damage_BackAnim: wheel_1_1_Damper_Damage_BackAnim {source="HitLF2Wheel";selection="wheel_1_4_damper";};

            class wheel_2_1_Damper_Damage_BackAnim: wheel_1_1_Damper_Damage_BackAnim {source="HitRFWheel";selection="wheel_2_1_damper";};
            class wheel_2_2_Damper_Damage_BackAnim: wheel_1_1_Damper_Damage_BackAnim {source="HitRBWheel";selection="wheel_2_2_damper";};
            class wheel_2_3_Damper_Damage_BackAnim: wheel_1_1_Damper_Damage_BackAnim {source="HitRMWheel";selection="wheel_2_3_damper";};
            class wheel_2_4_Damper_Damage_BackAnim: wheel_1_1_Damper_Damage_BackAnim {source="HitRF2Wheel";selection="wheel_2_4_damper";};

            // Wheels Damage END
            // Wheels END

                //Glass Damage START
                class Glass1_destruct
                {
                    type="hide";
                    selection="glass1";
                    source="HitGlass1";
                    minValue = 0;
                    maxValue = 1;
                    hidevalue = 0.99999;
                };
                class Glass2_destruct: Glass1_destruct {selection="glass2";source="HitGlass2";}; // Inherits from the the glass 1, only the selection and the source will be changed
                class Glass3_destruct: Glass1_destruct {selection="glass3";source="HitGlass3";};
                class Glass4_destruct: Glass1_destruct {selection="glass4";source="HitGlass4";};
                class Glass5_destruct: Glass1_destruct {selection="glass5";source="HitGlass5";};
                class Glass6_destruct: Glass1_destruct {selection="glass6";source="HitGlass6";};
                //Glass Damage END

            // destruct END
            class Fuel: Rotation
            {
                source="fuel";
                selection="fuel";
                axis="fuel_axis";
                maxValue=1;
                memory=1;
                angle0="rad -110";
                angle1=0;
            };
            class IndicatorSpeed: Rotation
            {
                source="speed";
                selection="mph";
                axis="mph_axis";
                memory=1;
                maxValue=38.900002;
                angle1="rad -265";
            };
            class IndicatorFuel: Rotation
            {
                type="rotation";
                source="fuel";
                selection="fuel_1";
                axis="fuel_1_axis";
                memory=1;
                minValue=0.000000;
                maxValue=1.000000;
                angle0=-0.087266;
                angle1=-1.658063;
            };
            class IndicatorRPM: Rotation
            {
                source="rpm";
                selection="rpm";
                axis="rpm_axis";
                memory=1;
                angle1="rad 80";
            };
            class DrivingWheel: Rotation
            {
                source="drivingWheel";
                selection="drivewheel";
                axis="drivewheel_axis";
                minValue=-1;
                maxValue=1;
                angle0=(rad 80);
                angle1=(rad -80);
            };
            class Steering_1_1
            {
                type="rotationY";
                source="drivingWheel";
                selection="wheel_1_1_steering";
                axis="wheel_1_1_steering_axis";
                memory=1;
                minValue= -1;
                maxValue= 1;
                angle0=1.047198;
                angle1=-1.047198;
            };
            class Steering_2_1: Steering_1_1
            {
                selection="wheel_2_1_steering";
                axis="wheel_2_1_steering_axis";
            };
            class Wheel_1_1
            {
                type="rotationX";
                source="wheel";
                selection="wheel_1_1";
                axis="wheel_1_1_axis";
                memory=1;
                sourceAddress="loop";
                minValue=0;
                maxValue=1;
                angle0=0;
                angle1="rad -360";
            };
            class wheel_2_1: Wheel_1_1
            {
                selection="wheel_2_1";
                axis="wheel_2_1_axis";
            };
            class wheel_1_2: Wheel_1_1
            {
                selection="wheel_1_2";
                axis="wheel_1_2_axis";
            };
            class wheel_1_3: Wheel_1_1
            {
                selection="wheel_1_3";
                axis="wheel_1_3_axis";
            };
            class Wheel_2_2: Wheel_1_1
            {
                selection="wheel_2_2";
                axis="wheel_2_2_axis";
            };
            class Wheel_2_3: Wheel_1_1
            {
                selection="wheel_2_3";
                axis="wheel_2_3_axis";
            };
            class Wheel_1_4: Wheel_1_1
            {
                selection="wheel_1_4";
                axis="wheel_1_4_axis";
            };
            class Wheel_2_4: Wheel_1_1
            {
                selection="wheel_2_4";
                axis="wheel_2_4_axis";
            };
            class Wheel_1_1_Damper
            {
                type="translation";
                source="damper";
                selection="wheel_1_1_damper_land";
                axis="posun wheel_1_1";
                animPeriod = 1;
                minValue="0";
                maxValue="1";
                offset0= "0.5";
                offset1= "-0.5";
                memory=1;
            };
            class wheel_2_1_Damper: Wheel_1_1_Damper
            {
                selection="wheel_2_1_damper_land";
            };
            class wheel_1_2_Damper: Wheel_1_1_Damper
            {
                selection="wheel_1_2_damper_land";
            };
            class Wheel_2_2_Damper: Wheel_1_1_Damper
            {
                selection="wheel_2_2_damper_land";
            };
            class daylights
            {
                type="hide";
                source="rpm";
                selection="daylights";
                minValue=-0.8;
                maxValue=0.2;
                unhidevalue=1;
                sourceAddress="clamp";
            };
            
            class reverse_light
            {
                type="Hide";
                selection="reverse_light";
                sourceAddress="clamp";
                source="Gear";
                minValue = -1;
                maxValue = 0;
                hideValue = "0.2";    
            };                        
            class prop_01
            {
                type="rotation";
                source="rpm";
                selection="prop_1";
                axis="prop_1_axis";
                memory=1;
                minValue=1000;
                maxValue=7000;
                angle0="rad 30";
                angle1="rad 35";
            };
            class damageHidedoor1: damageHide
            {
                selection="door1";
            };
            class damageHidedoor2: damageHide
            {
                selection="door2";
            };
            class turn_left_hide
            {
                type="hide";
                source="time";
                selection="turn_left";
                sourceAddress = loop;
                minValue = -0.5;//rad -28.64789
                maxValue = 0.5;//rad 28.64789
                hideValue = 0.5;
//                unHideValue = -1.0;//(default)
                animPeriod = 2.0;
                initPhase = 0.0;
            };
            class turn_right_hide
            {
                type="hide";
                source="time";
                selection="turn_right";
                sourceAddress = loop;
                minValue = -0.5;//rad -28.64789
                maxValue = 0.5;//rad 28.64789
                hideValue = 0.5;
//                unHideValue = -1.0;//(default)
                animPeriod = 0.0;
                initPhase = 0.0;
            };
            class turn_left
            {
                type="hide";
                source="user";
                selection="turn_left";
//                sourceAddress = clamp;// (default)
                minValue = -1.0;//rad -57.29578
                maxValue = 0.5;//rad 28.64789
                hideValue = 0.5;
                unHideValue = 1.0;
                animPeriod = 0.0;
                initPhase = 0.0;
            };
            class turn_right
            {
                type="hide";
                source="user";
                selection="turn_right";
//                sourceAddress = clamp;// (default)
                minValue = -1.0;//rad -57.29578
                maxValue = 0.5;//rad 28.64789
                hideValue = 0.5;
                unHideValue = 1.0;
                animPeriod = 0.0;
                initPhase = 0.0;
            };
            class auxiliarylights_off
            {
                type="hide";
                source="time";
                selection="auxiliarylights";
                sourceAddress = loop;
                minValue = -0.5;//rad -45.836624
                maxValue = 0.5;//rad 11.459156
                hideValue = 0.5;
//                unHideValue = -1.0;//(default)
                animPeriod = 0.0;
                initPhase = 0.0;
            };
            class auxiliarylights_on
            {
                type="hide";
                source="auxiliarylights";
                selection="auxiliarylights";
//                sourceAddress = clamp;// (default)
                minValue = -1.0;//rad -45.836624
                maxValue = 0.5;//rad 11.459156
                hideValue = 0.5;
                unHideValue = 1.0;
                animPeriod = 0.0;
                initPhase = 0.0;
            };    
        };
    };
};

 

 

Share this post


Link to post
Share on other sites

There are quite a lot of problems with your model.cfg. It won't be easy to tell you specifically what the problem is unfortunately.

 

The first thing you should look at is the SkeletonBones[].

These entries need to be pairs of data, where one bone is defined as being 'attached' to another.

 

In this example, the door is a bone but is not dependent on anything else, and the door_handle is attached (and moves with) the door:

"door", "",

"door_handle", "door",

 

I've attempted to fix the top half of your SkeletonBones[] to give you an idea, but you'll need to fix the rest:

SkeletonBones[] = {
	"drivewheel", "",
	"wheel_1_1_damper_land", "",
	"wheel_1_2_damper_land", "",
	"wheel_1_3_damper_land", "",
	"wheel_1_4_damper_land", "",
	"wheel_2_1_damper_land", "",
	"wheel_2_2_damper_land", "",
	"wheel_2_3_damper_land", "",
	"wheel_2_4_damper_land", "",
	"wheel_1_1_damper", "wheel_1_1_damper_land",
	"wheel_1_2_damper", "wheel_1_2_damper_land",
	"wheel_1_3_damper", "wheel_1_3_damper_land",
	"wheel_1_4_damper", "wheel_1_4_damper_land",
	"wheel_2_1_damper", "wheel_2_1_damper_land",
	"wheel_2_2_damper", "wheel_2_2_damper_land",
	"wheel_2_3_damper", "wheel_2_3_damper_land",
	"wheel_2_4_damper", "wheel_2_4_damper_land",
	"wheel_1_1_steering", "wheel_1_1_damper",
	"wheel_1_2_steering", "wheel_1_2_damper",
	"wheel_1_3_steering", "wheel_1_3_damper",
	"wheel_1_4_steering", "wheel_1_4_damper",
	"wheel_2_1_steering", "wheel_2_1_damper",
	"wheel_2_2_steering", "wheel_2_2_damper",
	"wheel_2_3_steering", "wheel_2_3_damper",
	"wheel_2_4_steering", "wheel_2_4_damper",
	"wheel_1_1", "wheel_1_1_steering",
	"wheel_1_2", "wheel_1_2_steering",
	"wheel_1_3", "wheel_1_3_steering",
	"wheel_1_4", "wheel_1_4_steering",
	"wheel_2_1", "wheel_2_1_steering",
	"wheel_2_2", "wheel_2_2_steering",
	"wheel_2_3", "wheel_2_3_steering",
	"wheel_2_4", "wheel_2_4_steering",
	"wheel_1_1_unhide", "wheel_1_1",
	"wheel_1_2_unhide", "wheel_1_2",
	"wheel_1_3_unhide", "wheel_1_3",
	"wheel_1_4_unhide", "wheel_1_4",
	"wheel_2_1_unhide", "wheel_2_1",
	"wheel_2_2_unhide", "wheel_2_2",
	"wheel_2_3_unhide", "wheel_2_3",
	"wheel_2_4_unhide", "wheel_2_4",
	"wheel_1_1_hide", "wheel_1_1",
	"wheel_1_2_hide", "wheel_1_2",
	"wheel_1_3_hide", "wheel_1_3",
	"wheel_1_4_hide", "wheel_1_4",
	"wheel_2_1_hide", "wheel_2_1",
	"wheel_2_2_hide", "wheel_2_2",
	"wheel_2_3_hide", "wheel_2_3",
	"wheel_2_4_hide", "wheel_2_4",
	"otocvez", "",
	"auxiliarylights_on", "",
	"auxiliarylights", "",
	//"auxiliarylights", "auxiliarylights_on",   // use this line instead if auxiliarylights are supposed to be dependent on auxiliarylights_on
	"otochlaven", "otocvez",
	"damagehlaven", "otochlaven",
	"damagevez", "otocvez",
	"damagehide", "", 
	"glass1", "damagehide", 
	"glass2", "damagehide", 
	"glass3", "damagehide",
	"glass4", "damagehide",
	"daylights", "damagehide",
	"turn_left", "daylights",
	"turn_right", "daylights",

	// not sure what happens after here - make them into pairs of bones
	"daylights",
	"ukaz_rychlo",
	"takedown",
	"ukaz_rychlo2",
	"BlueLight2",
	"ukaz_rpm",
	"BlueLight1",
	"mph",
	"BlueLight1_dir",
	"rpm",
	"BlueLight2_dir",
	"fuel",
	"takedown_axis",
	"fuel_1",
	"WhiteLightbar",
	"fuel_01",
	"WhiteLightbar_dir",
	"fuel_2",
	"fuel_3",
	"prop_01",
	//"auxiliarylights_on", "auxiliarylights1_on",
	"prop_02",
	"lightbar_glass",
	"prop_2",
	"lightbar_lights",
	"prop_1",
	"lightbar_top",
	"reverse_light", "daylights",
	"turn_left_hide"    ,"",
	"turn_right_hide"    ,"",
	"fullLights_on",
	"dummy",
	"fullLights_off",
	"lightbar_top",
	"extraLights1",
	"lightbar_front",
	"extraLights2",
	"lightbar_back",
	"extraLights2_off",
	"cage",
	"extraLights1_off",
	"directional",
	"fullLights1_on",
	"rambar",
	"fulllights1_off",
	"fulllights2_off",
	"fulllights2_on",
	"radar",
	"auxiliarylights1_pos",          // probably shouldn't be here unless the light is steerable somehow?
	"auxiliarylights1_dir",          // probably shouldn't be here unless the light is steerable somehow?
	"auxiliarylights1_hitpoint",     // probably shouldn't be here unless the light is steerable somehow?
	// blank bone entries below should be removed
	"",
	"",
	"",
	"",
	"",
	"",
	"",
	""
};

 

 

Share this post


Link to post
Share on other sites

allright thank you :). Btw does the lights im trying to set up look allright? i mean beside the problems you commented on? :)

Share this post


Link to post
Share on other sites

Um, maybe. But until some of the basic stuff is corrected, it's hard to comment on whether the more complex parts are going to be correct or not.

 

Share this post


Link to post
Share on other sites

Hey guys,  I'm facing the same problem!
 

On 11/07/2017 at 5:51 AM, Darkhorse93 said:

allright thank you :). Btw does the lights im trying to set up look allright? i mean beside the problems you commented on? :)

Did it worked for you?


I'm trying to set up some auxiliary lights at my F-5EM Tiger II model.
I've already tested grouping all the Auxiliary light sources as a subclass inside the main "Reflectors Group", it worked out, but when I put the landing gear up, all the lights are gone!
So I decided to include a "useraction" menu enter like this:
 

Quote

            class Auxiliary_lights_on
            {
                displayName = "<t color='#fffa00'>Auxiliary Lights On</t>";
                position = "zamerny";
                showWindow = 0;
                radius = 6;
                priority = 8;
                onlyForPlayer = 0;
                condition = "this animationphase 'Auxiliary' > 0.9";
                statement = "this animate ['Auxiliary',0]";
            };
            class Auxiliary_lights_off
            {
                displayName = "<t color='#fffa00'>Auxiliary Lights Off</t>";
                position = "zamerny";
                showWindow = 0;
                radius = 6;
                priority = 8;
                onlyForPlayer = 0;
                condition = "this animationphase 'Auxiliary' < 0.1";
                statement = "this animate ['Auxiliary',1]";
            };

And separate the "Auxiliary Lights" class from the main Reflector class like this:
 

Quote

        class Auxiliary_lights
        {
            class Fuel
            {
                color[] = {7000, 7500, 10000, 1};
                ambient[] = {100, 100, 100};
                position = "light_fuel_pos";
                direction = "light_fuel_end";
                hitpoint = "Light_fuel";
                selection = "Refuel_light";
                innerAngle = 10;
                outerAngle = 60;
                coneFadeCoef = 10;
                intensity = 50;
                useFlare = true;
                dayLight = false;
                FlareSize = 4;
                size = 1;
                class Attenuation
                {
                    start = 1;
                    constant = 0;
                    linear = 0;
                    quadratic = 4;
                    hardLimitStart = 75;
                    hardLimitEnd = 150;
                };
            };
            class Interception: Fuel
            {
                position = "Light_interception_pos";
                direction = "Light_interception_end";
                hitpoint = "Light_interception";
                selection = "Interception_light";
            };
            class Fuselage_R: Fuel
            {
                position = "Light_fuse_r_pos";
                direction = "Light_fuse_r_end";
                hitpoint = "Light_fuse_r";
                selection = "Fuselage_light";
            };
            class Fuselage_L: Fuel
            {
                position = "Light_fuse_l_pos";
                direction = "Light_fuse_l_end";
                hitpoint = "Light_fuse_l";
                selection = "Fuselage_light";
            };
        };

Since I put them all inside a single "Auxiliary Light" class, just in order to test, I decided to put all the glowing material selections inside a new "Auxiliary Lights" selection. I did it both in Lod 1 for selections and for the memory points in it's lod.
I had to add this selection name in the skeletonbones sections and setup a animation for this selection.
All the selections hide and reappear as it should using the action menu, except by the ray of light... =/

I really don't know how to make it working properly!
Can you please help me?

Share this post


Link to post
Share on other sites

So far i got no luck with this what so ever :(

  • Like 1

Share this post


Link to post
Share on other sites

so far i got the scrollwheel option to work and the texture turns off and on, but my problem now is that the reflection itself dont follow with the texture when it turns on and off. So i tried to put the name of the reflectors in the souce option and it still wont work.
 

@Ogrinho You said your lights where working could you please give me a hint on what you did put inside the model in order to get your reflectors to turn on and off?. It would be really nice if you could because im still stuck on this part of the vehicle.

  • Like 1

Share this post


Link to post
Share on other sites
On 16/07/2017 at 10:49 AM, Darkhorse93 said:

so far i got the scrollwheel option to work and the texture turns off and on, but my problem now is that the reflection itself dont follow with the texture when it turns on and off. So i tried to put the name of the reflectors in the souce option and it still wont work.
 

@Ogrinho You said your lights where working could you please give me a hint on what you did put inside the model in order to get your reflectors to turn on and off?. It would be really nice if you could because im still stuck on this part of the vehicle.


The only way I could make all the lights work was placing it as subclasses inside the "class reflectors", then it worked properly both reflections and the glowing textures. But when I retract the F-5's landing gear all the lights just shut down...

I'm facing the same problem with a separate scroll wheel option, my glowing textures turns on and off, but no reflections neither flares are showed...

Share this post


Link to post
Share on other sites

Ooh i see. Would be nice if someone that have this option on their vehicle could explain how they did it, we are not the only one that have this problem and im sure who ever wanna make this aswell would wanna know how to do it :)

  • Like 1

Share this post


Link to post
Share on other sites
15 hours ago, Ogrinho said:


The only way I could make all the lights work was placing it as subclasses inside the "class reflectors", then it worked properly both reflections and the glowing textures. But when I retract the F-5's landing gear all the lights just shut down...

I'm facing the same problem with a separate scroll wheel option, my glowing textures turns on and off, but no reflections neither flares are showed...

I might be thinking of something else, but I seem to recall something in the BIS scripts that could regulate landing gear lights on and off depending on gear state. Check out the config and model files for the Wipeout. Alternatively, see if any of the good A10 mods have done this.

  • Like 1

Share this post


Link to post
Share on other sites

Okey so i fixed my own problem and i will explain for those out there who are looking to do the same on your models. I have not test this on a live server so it might work or not, but in the editor it works perfect.

 

So what my point from the begining was to get 2 reflectors to turn on and off aswell as the glowing texture that lights have and make it work though the useraction menu

 

This is what i have in the Config.Cpp

Spoiler

In Class "EventHandlers" i have this:

 

        class EventHandlers
        {
            init="_this execVM ""nVts_eclipse\scripts\init.sqf"";";
        };

 

In Class "Reflectors" i have this:


            class focoR
            {
                color[] = {7000,7500,10000};
                ambient[] = {70,75,100};
                intensity = 80;
                size = 1;
                innerAngle = 45;
                outerAngle = 85;
                coneFadeCoef = 10;
                position="alley_right";
                direction="alley_right_end";
                hitpoint="alley-right";
                selection="alley-right";
                useFlare = 1;
                dayLight = 0;
                flareSize = 6;
                flareMaxDistance = 250;
                class Attenuation
                {
                    start = 0;
                    constant = 0;
                    linear = 1;
                    quadratic = 1;
                    hardLimitStart = 150;
                    hardLimitEnd = 300;
                };
            };
            class focoL
            {
                color[] = {7000,7500,10000};
                ambient[] = {70,75,100};
                intensity = 80;
                size = 1;
                innerAngle = 45;
                outerAngle = 85;
                coneFadeCoef = 10;
                position="alley_left";
                direction="alley_left_end";
                hitpoint="alley-left";
                selection="alley-left";
                useFlare = 1;
                dayLight = 0;
                flareSize = 6;
                flareMaxDistance = 250;
                class Attenuation
                {
                    start = 1;
                    constant = 0;
                    linear = 0;
                    quadratic = 1;
                    hardLimitStart = 150;
                    hardLimitEnd = 300;
                };
            };
        };
        aggregateReflectors[] = {{"LightCarHeadL01", "LightCarHeadR01", "focoR", "focoL", ""}};

 

In Class "Useractions" i have this:

            class Foco_on
            {
                displayName = "<t color='#193c65'>Auxiliary Light (Z)</t>";
                displayNameDefault = "<img image='\A3\Ui_f\data\IGUI\Cfg\Actions\ico_cpt_land_on_ca.paa' size='1.5' />";
                position = "drivewheel_axis";
                radius = 1;
                onlyForPlayer = 1;
                condition = "this animationPhase ""foco_on"" < 0.5 AND Alive(this)  AND driver this == player";
                statement = "this animate ['foco_on',1], this animate ['foco2_on',1]";
                shortcut = "MoveDown";
                showWindow = 0;
            };
            class Foco_off
            {
                displayName = "<t color='#193c65'>Auxiliary Light (Z)</t>";
                displayNameDefault = "<img image='\A3\Ui_f\data\IGUI\Cfg\Actions\ico_cpt_land_off_ca.paa' size='1.5' />";
                position = "drivewheel_axis";
                radius = 1;
                onlyForPlayer = 1;
                condition = "this animationPhase ""foco_on"" > 0.5 AND Alive(this)  AND driver this == player";
                statement = "this animate ['foco_on',0], this animate ['foco2_on',0]";
                shortcut = "MoveDown";
                showWindow = 0;
            };

 

In Class "AnimationSources" i have this:

        class AnimationSources: AnimationSources
        {
            class turn_left
            {
                source = "user";
                animPeriod = 0.001;
                initPhase = 0;
            };
            class foco_on: turn_left{};
            class foco2_on: turn_left{};
        };

 



As for the Model.Cfg i have done it like this.

 

Spoiler

In Class "CfgSkeletons" i have this:

            "alley-left"    ,"",
            "alley-right"    ,"",

In the axis i have this:

alley_left
alley_left_end
alley_right
alley_right_end

 

And for the Class "Animations" i have this:

 

            class foco_on
            {
                type="hide";
                source="user";
                selection="alley-right";
//                sourceAddress = clamp;// (default)
                minValue = -0.8;//rad -45.836624
                maxValue = 0.2;//rad 11.459156
                hideValue = 0.2;
                unHideValue = 1.0;
                animPeriod = 0.0;
                initPhase = 0.0;
            };
            class foco2_on: foco_on
            {
                source="user";
                selection="alley-left";
            };
            class foco_off
            {
                type="hide";
                source="time";
                selection="alley-right";
                sourceAddress = loop;
                minValue = -0.8;//rad -45.836624
                maxValue = 0.2;//rad 11.459156
                hideValue = 999990.0;
//                unHideValue = -1.0;//(default)
                animPeriod = 0.0;
                initPhase = 0.0;
            };
            class foco2_off: foco_off
            {
                source="time";
                selection="alley-left";
            };

 

This lights are run though a scrip. The script is called "lights.sqf" and an other called "init.sqf"

Spoiler

Inside "init.sqf" i have this:

if (!hasInterface) exitwith {};
params["_vcl","_lights","_light"];
[_vcl] execVM "nVts_eclipse\scripts\lights.sqf";
exit;

 

Inside "lights.sqf" i have this:

_vcl = _this select 0;

while{alive _vcl} do{

    _phaseLightLeft = round(_vcl animationPhase "foco2_on");
    _phaseLightRight = round(_vcl animationPhase "foco_on");

    if (_phaseLightRight == 1) then {
        _vcl setHit ["alley-right",0];
    }else{
        _vcl setHit ["alley-right",1];
    };
    if (_phaseLightLeft == 1) then {
        _vcl setHit ["alley-left",0];
    }else{
        _vcl setHit ["alley-left",1];
    };
    sleep 0.01;
};
exit;


I hope this did help someone as in for me it took me a while to get this done and hope for you guys out there too have some clue on how to get this done. Im no scripter but i can get around it and work it out :)
/Dex

  • Like 1

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

×