Jump to content
jaac

Removable Vehicles Camo Net

Recommended Posts

Hi

 

I put a camo net on my vehicle by doing this...

 

CfgVehicles:

        class UserActions
        {
            class Mettre_CamouflageDes {
                priority = 0;
                displayName = "Deployer Filet Camouflage";
                position = "FiletCamo";
                radius = 5;
                showWindow = 0;
                onlyForPlayer = 0;
                condition = "this animationPhase ""Filet_Camo1"" > 0.5";
                statement = "this animate [""Filet_Camo1"",0]";
            };
            class Enlever_CamouflageDes {
                priority = 0;
                displayName = "Deposer Filet Camouflage";
                position = "FiletCamo";
                radius = 5;
                showWindow = 0;
                onlyForPlayer = 0;
                condition = "this animationPhase ""Filet_Camo1"" < 0.5";
                statement = "this animate [""Filet_Camo1"",1]";
            };                    
        };   
        class AnimationSources: AnimationSources
         {
    class  Filet_Camo1
            {
                source         = "user";
                animPeriod = 2;
                initPhase     = 0;
            };                        
        }; 

Model.cfg:

        class Animations
        {
            class Filet_Camo1
            {
                type="hide";
                source="user";
                selection="VAB_FiletCamoDes";
                minValue = 0;
                maxValue = 1;
                hideValue = 1;
            };
        };

It work well :)

 

Camo is already present on the vehicle, I can remove it... And I can put back it above at will.

 

But.....

 

I wish it was not present at the start, I tried unsuccessfully to change settings several times.

ex With:

minValue = -1;

maxValue = 0;

this reverses the process, but I can not put the camo

 

Is it possible to do this? :huh:

Share this post


Link to post
Share on other sites

Change the initial phase of the animation in your AnimationSources and it should work as desired.
Oh, and if you want your camo net to be "selectable" on Virtual Garage, add an animation name to that animation source.

class AnimationSources: AnimationSources
{
    class  Filet_Camo1
    {
        displayName="Show camo net";
        author="My loving mother";
        source         = "user";
        animPeriod = 2;
        initPhase     = 1;  /// Modified to 1.
    };                        
};

Greetings.

 

Share this post


Link to post
Share on other sites

Can do it simply by inverting the hide animation as well with

hidevalue = 0; // makes the selection hidden from init at value of 0
unhidevalue = 0.5; // can be set to 1 but 0.5 basically means it'll unhide when the control value tends towards 1, since the animation is a binary on/off state

Now that we have an "unhide" parameter for hide type animations.

Share this post


Link to post
Share on other sites

thanks to both of you...

 

It works flawlessly! ;)

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

×