Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

School door's fix

Experienced Elementalist
Joined
Mar 10, 2015
Messages
264
Reaction score
33
That guide about how to do doors of Guard house openable. But we have an 1 problem. If we open 1 door, then all doors in building is opening. o_O

Originnaly we only adding in config, user action and animation strings.

1. Extract the "config.bin" file from "structures_military.pbo"
2. Convert "config.bin" with UnRap to "config.cpp"
3. Open "config.cpp" with notepad and search for

Code:
    class Land_Mil_Guardhouse : HouseNoDestruct {
        scope = 1;
        model = "\dz\structures\Mil\Mil_Guardhouse.p3d";

than rewrite like that
Code:
    class Land_Mil_Guardhouse : House {
        scope = 1;
        model = "\dz\structures\Mil\Mil_Guardhouse.p3d";

than go to down and there we have
Code:
        class Doors {
            class Doors1 {

than we rewrite like this
Code:
        class AnimationSources {
            class Doors1 {

than, after this
Code:
            class Doors4 {
                displayName = "door 4";
                component = "Doors4";
                soundPos = "doors4_action";
                animPeriod = 1;
                initPhase = 0;
                initOpened = 0.5;
                armor = 0.2;
                soundOpen = "doorMetalSmallOpen";
                soundClose = "doorMetalSmallClose";
                soundLocked = "doorWoodRattle";
            };
        };

add this
Code:
        class UserActions 
        {
            class OpenDoors1
            {
                displayNameDefault = "Open door";
                displayName = "Open door";
                position = "Doors1_action";
                radius = 3;
                onlyForPlayer = 0;
                condition = "this animationPhase ""Doors1"" < 0.5";
                statement = "this animate [""Doors1"", 1];";
            };
            class CloseDoors1
            {
                displayNameDefault = "Close door";
                displayName = "Close door";
                position = "Doors1_action";
                radius = 3;
                onlyForPlayer = 0;
                condition = "this animationPhase ""Doors1"" >= 0.5";
                statement = "this animate [""Doors1"", 0];";
            };
            class OpenDoors2
            {
                displayNameDefault = "Open door";
                displayName = "Open door";
                position = "Doors2_action";
                radius = 3;
                onlyForPlayer = 0;
                condition = "this animationPhase ""Doors2"" < 0.5";
                statement = "this animate [""Doors2"", 1];";
            };
            class CloseDoors2
            {
                displayNameDefault = "Close door";
                displayName = "Close door";
                position = "Doors2_action";
                radius = 3;
                onlyForPlayer = 0;
                condition = "this animationPhase ""Doors2"" >= 0.5";
                statement = "this animate [""Doors2"", 0];";
            };
            class OpenDoors3
            {
                displayNameDefault = "Open door";
                displayName = "Open door";
                position = "Doors3_action";
                radius = 3;
                onlyForPlayer = 0;
                condition = "this animationPhase ""Doors3"" < 0.5";
                statement = "this animate [""Doors3"", 1];";
            };
            class CloseDoors3
            {
                displayNameDefault = "Close door";
                displayName = "Close door";
                position = "Doors3_action";
                radius = 3;
                onlyForPlayer = 0;
                condition = "this animationPhase ""Doors3"" >= 0.5";
                statement = "this animate [""Doors3"", 0];";
            };
            class OpenDoors4
            {
                displayNameDefault = "Open door";
                displayName = "Open door";
                position = "Doors4_action";
                radius = 3;
                onlyForPlayer = 0;
                condition = "this animationPhase ""Doors4"" < 0.5";
                statement = "this animate [""Doors4"", 1];";
            };
            class CloseDoors4
            {
                displayNameDefault = "Close door";
                displayName = "Close door";
                position = "Doors4_action";
                radius = 3;
                onlyForPlayer = 0;
                condition = "this animationPhase ""Doors4"" >= 0.5";
                statement = "this animate [""Doors4"", 0];";
            };
        };

then save file and add it to "structures_military.pbo"
go to game and be happy) Doors work

For the lazzy peoples - here is full script.
find the "class Land_Mil_Guardhouse : HouseNoDestruct" and replace all with that.

Code:
    class Land_Mil_Guardhouse : House {
        scope = 1;
        model = "\dz\structures\Mil\Mil_Guardhouse.p3d";

        class AnimationSources {
            
            class Doors1 {
                displayName = "door 1";
                component = "Doors1";
                soundPos = "doors1_action";
                animPeriod = 1;
                initPhase = 0;
                initOpened = 0.4;
                armor = 0.2;
                soundOpen = "doorWoodSmallOpen";
                soundClose = "doorWoodSmallClose";
                soundLocked = "doorWoodRattle";
            };
            
            class Doors2 {
                displayName = "door 2";
                component = "Doors2";
                soundPos = "doors2_action";
                animPeriod = 1;
                initPhase = 0;
                initOpened = 0.4;
                armor = 0.2;
                soundOpen = "doorWoodSmallOpen";
                soundClose = "doorWoodSmallClose";
                soundLocked = "doorWoodRattle";
            };
            
            class Doors3 {
                displayName = "door 3";
                component = "Doors3";
                soundPos = "doors3_action";
                animPeriod = 1;
                initPhase = 0;
                initOpened = 0.2;
                armor = 0.2;
                soundOpen = "doorWoodSmallOpen";
                soundClose = "doorWoodSmallClose";
                soundLocked = "doorWoodRattle";
            };
            
            class Doors4 {
                displayName = "door 4";
                component = "Doors4";
                soundPos = "doors4_action";
                animPeriod = 1;
                initPhase = 0;
                initOpened = 0.5;
                armor = 0.2;
                soundOpen = "doorMetalSmallOpen";
                soundClose = "doorMetalSmallClose";
                soundLocked = "doorWoodRattle";
            };
        };
        class UserActions 
        {
            class OpenDoors1
            {
                displayNameDefault = "Open door";
                displayName = "Open door";
                position = "Doors1_action";
                radius = 3;
                onlyForPlayer = 0;
                condition = "this animationPhase ""Doors1"" < 0.5";
                statement = "this animate [""Doors1"", 1];";
            };
            class CloseDoors1
            {
                displayNameDefault = "Close door";
                displayName = "Close door";
                position = "Doors1_action";
                radius = 3;
                onlyForPlayer = 0;
                condition = "this animationPhase ""Doors1"" >= 0.5";
                statement = "this animate [""Doors1"", 0];";
            };
            class OpenDoors2
            {
                displayNameDefault = "Open door";
                displayName = "Open door";
                position = "Doors2_action";
                radius = 3;
                onlyForPlayer = 0;
                condition = "this animationPhase ""Doors2"" < 0.5";
                statement = "this animate [""Doors2"", 1];";
            };
            class CloseDoors2
            {
                displayNameDefault = "Close door";
                displayName = "Close door";
                position = "Doors2_action";
                radius = 3;
                onlyForPlayer = 0;
                condition = "this animationPhase ""Doors2"" >= 0.5";
                statement = "this animate [""Doors2"", 0];";
            };
            class OpenDoors3
            {
                displayNameDefault = "Open door";
                displayName = "Open door";
                position = "Doors3_action";
                radius = 3;
                onlyForPlayer = 0;
                condition = "this animationPhase ""Doors3"" < 0.5";
                statement = "this animate [""Doors3"", 1];";
            };
            class CloseDoors3
            {
                displayNameDefault = "Close door";
                displayName = "Close door";
                position = "Doors3_action";
                radius = 3;
                onlyForPlayer = 0;
                condition = "this animationPhase ""Doors3"" >= 0.5";
                statement = "this animate [""Doors3"", 0];";
            };
            class OpenDoors4
            {
                displayNameDefault = "Open door";
                displayName = "Open door";
                position = "Doors4_action";
                radius = 3;
                onlyForPlayer = 0;
                condition = "this animationPhase ""Doors4"" < 0.5";
                statement = "this animate [""Doors4"", 1];";
            };
            class CloseDoors4
            {
                displayNameDefault = "Close door";
                displayName = "Close door";
                position = "Doors4_action";
                radius = 3;
                onlyForPlayer = 0;
                condition = "this animationPhase ""Doors4"" >= 0.5";
                statement = "this animate [""Doors4"", 0];";
            };
        };
    };
};

If add "class UserActions" for school building, doors work's too.
I know my english is bad but i'm working on it)



And here is full config.cpp of shool building
 
Last edited:
Junior Spellweaver
Joined
May 22, 2015
Messages
103
Reaction score
29
For double doors is better
statement = "this animate [""memorypoint1"", state];this animate [""memorypoint2"", state];";

Because the idea of the sound source was stolen by shitbrix like a dayzunion, I place guide here.

also you can add sound:
statement = "this animate [""memorypoint1"", state];this animate [""memorypoint2"", state];this say ""door_sound"";";

* see in model.p3d
** 0 or 1
*** any CfgSounds file
 
Last edited:
Junior Spellweaver
Joined
Mar 14, 2016
Messages
103
Reaction score
10
how to fix the walls? the walls of my server to cross this very easy!
(sorry for my English )
 
Experienced Elementalist
Joined
Mar 10, 2015
Messages
264
Reaction score
33
how to fix the walls? the walls of my server to cross this very easy!
(sorry for my English )

how i understand, you want to say is collision of the wall isn't working?
 
Junior Spellweaver
Joined
Mar 14, 2016
Messages
103
Reaction score
10
yes, the player can see through the walls, as if there were not a physical wall ..
 
Experienced Elementalist
Joined
Mar 10, 2015
Messages
264
Reaction score
33
yes, the player can see through the walls, as if there were not a physical wall ..

Ouch, i know about that, it's normal for Dayz. Becouse game is too buggy and we need fix that all. But not from all walls thay can see.
 
Newbie Spellweaver
Joined
Sep 29, 2013
Messages
40
Reaction score
4
Seems a bit like recatching all the horses rather than just locking the gate. There is obviously 1 bit of code previous to these calls that is fubar. We fix That, we fix all the doors. Without adding massive amounts of code. We need to check what happens when we try to open the door, and see what isnt working, as by rights, this code should work.
 
Back
Top