Jump to content
Sign in to follow this  
XxClon

Open the Doors

Recommended Posts

I have one problem with my doors is broken :/ i need help please is double door

 

Quote

class CfgVehicles
{
    class House;
    class House_EP1: House
    {
        class DestructionEffects;
    };
    class Ruins_F;
    class land_wall_l3_gate_ep1brown: House_EP1
    {
        displayName = "Puerta Marron";
        scope = 1;
        model = "gates\wall_l3_gate_ep1brown.p3d";
        destrType = "DestructTree";
        class AnimationSources
        {
            class Dvere1
            {
                animPeriod = 1;
            };
            class Dvere2
            {
                animPeriod = 1;
            };
        };
        class UserActions
        {
            class OpenDoors1
            {
                displayNameDefault = "$STR_DN_OUT_O_DOOR_DEFAULT";
                displayName = "$STR_DN_OUT_O_DOOR";
                position = "osa Door_1";
                radius = 2;
                onlyForPlayer = 0;
                condition = "this animationPhase ""Dvere1"" < 0.5";
                statement = "this animate [""Dvere1"", 1];this animate [""Dvere2"", 1]";
            };
            class CloseDoors1
            {
                displayNameDefault = "$STR_DN_OUT_C_DOOR_DEFAULT";
                displayName = "$STR_DN_OUT_C_DOOR";
                position = "osa Door_1";
                radius = 2;
                onlyForPlayer = 0;
                condition = "this animationPhase ""Dvere1"" >= 0.5";
                statement = "this animate [""Dvere1"", 0];this animate [""Dvere2"", 0]";
            };
            class OpenDoors2: OpenDoors1
            {
                position = "osa Door_2";
                condition = "this animationPhase ""Dvere2"" < 0.5";
                statement = "this animate [""Dvere2"", 1];this animate [""Dvere1"", 1]";
            };
            class CloseDoors2: CloseDoors1
            {
                position = "osa Door_2";
                condition = "this animationPhase ""Dvere2"" >= 0.5";
                statement = "this animate [""Dvere2"", 0];this animate [""Dvere1"", 0]";
            };
        };
        actionBegin1 = "OpenDoors1";
        actionEnd1 = "OpenDoors1";
        actionBegin2 = "OpenDoors1";
        actionEnd2 = "OpenDoors1";
    };

 

Share this post


Link to post
Share on other sites
40 minutes ago, jAMDup said:

Can you post your model configuration as well please?

yes it is

 

Quote

class CfgModels
{
    class Default
    {
        sectionsInherit = "";
        sections[] = {};
        skeletonName = "";
    };

    class wall_l3_gate_ep1brown: Default
    {
        skeletonName = "wall_l3_gate_ep1brown";
        sections[] = {};
        sectionsInherit = "";
        class Animations
        {
            class Door01_rot
            {
                type            = rotationZ;
                source          = Zeroanimation;
                selection       = Door01;
                axis            = Door01_Axis;
                memory          = 1;
                minValue        = 0;
                maxValue        = 1;
                angle0          = 0;
                angle1          = (rad 110);
            };
            class Door02_rot: Door01_rot
            {
                selection       = Door02;
                axis            = Door02_Axis;
            };
            class Door03_rot: Door01_rot
            {
                selection       = Door02;
                axis            = Door02_Axis;
            };
           
        };
    };

 

 

Share this post


Link to post
Share on other sites

First check if your model animate properly in Buldozer.

Some suggestions:

1. Class names in AnimationSources need to be same as names in model.cfg

Quote

class AnimationSources
        {
            class Door01_rot
            {
                source = "user";

                animPeriod = 1;

                initPhase = 0;
            };
            .......
        };

2. User actions same:

Quote

class OpenDoors1
            {
                displayNameDefault = "$STR_DN_OUT_O_DOOR_DEFAULT";
                displayName = "$STR_DN_OUT_O_DOOR";
                position = "osa Door_1";
                radius = 2;
                onlyForPlayer = 0;
                condition = "this animationPhase ""Door01_rot"" < 0.5";
                statement = "this animate [""Door01_rot"", 1];this animate [""Door02_rot"", 1]";
            };

 

3. https://community.bistudio.com/wiki/ArmA:_How_to_animate_a_model#User_Animation

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  

×