Jump to content
jimmybulmer

Doors not working in config.cpp and model.cfg

Recommended Posts

I am creating a bank for a community and am currently having issues with the doors not opening. The option appears when I look at the door (it says 'Open Door') but when I click it nothing happens and the option remains as 'Open Door'

#define _ARMA_

class CfgPatches
{
    class CG_CityBank
    {
        units[] = {};
        weapons[] = {};
        requiredVersion = 0.1;
        requiredAddons[] = {};
    };
};

class CfgVehicleClasses
{
    class CG_Structures
    {
        displayName = "Critical Gaming - Structures";
    };
};

class CfgVehicles
{
    class House;
    class House_F: House{};
    class Land_CG_CityBank_A: House_F
    {
        displayName = "City Bank";
        textSingular = "City Bank";
        author = "CGJimmyBulmer";
        model = "\CG_Structures\CG_Bank_01\Land_CG_CityBank_A";
        vehicleClass = "CG_Structures";
        placement = "vertical";
        scope = 2;
        mapSize = 12;
        animated = "true";
        class AnimationSources
        {
            class Zeroanimation
            {
                source = "user";
                animPeriod = 0;
                initPhase = 0;
            };
        };
        class UserActions
        {
            class Door01_Open
            {
                displayName = "Open Door";
                position = "Door01_Trigger";
                radius = 3;
                onlyForPlayer = "true";
                condition = "this animationPhase ""Door01""<0.5";
                statement = "this animate [""Door01"", 1]";
            };
            class Door01_Close
            {
                displayName = "Close Door";
                position = "Door01_Trigger";
                radius = 3;
                onlyForPlayer = "true";
                condition = "this animationPhase ""Door01""==1";
                statement = "this animate [""Door01"", 0]";
            };
            class Door02_Open
            {
                displayName = "Open Door";
                position = "Door02_Trigger";
                radius = 3;
                onlyForPlayer = "true";
                condition = "this animationPhase ""Door02""<0.5";
                statement = "this animate [""Door02"", 1]";
            };
            class Door02_Close
            {
                displayName = "Close Door";
                position = "Door02_Trigger";
                radius = 3;
                onlyForPlayer = "true";
                condition = "this animationPhase ""Door02""==1";
                statement = "this animate [""Door02"", 0]";
            };
            class Door03_Open
            {
                displayName = "Open Door";
                position = "Door03_Trigger";
                radius = 3;
                onlyForPlayer = "true";
                condition = "this animationPhase ""Door03""<0.5";
                statement = "this animate [""Door03"", 1]";
            };
            class Door03_Close
            {
                displayName = "Close Door";
                position = "Door03_Trigger";
                radius = 3;
                onlyForPlayer = "true";
                condition = "this animationPhase ""Door03""==1";
                statement = "this animate [""Door03"", 0]";
            };
            class Door04_Open
            {
                displayName = "Open Door";
                position = "Door04_Trigger";
                radius = 3;
                onlyForPlayer = "true";
                condition = "this animationPhase ""Door04""<0.5";
                statement = "this animate [""Door04"", 1]";
            };
            class Door04_Close
            {
                displayName = "Close Door";
                position = "Door04_Trigger";
                radius = 3;
                onlyForPlayer = "true";
                condition = "this animationPhase ""Door04""==1";
                statement = "this animate [""Door04"", 0]";
            };
            class Door05_Open
            {
                displayName = "Open Door";
                position = "Door05_Trigger";
                radius = 3;
                onlyForPlayer = "true";
                condition = "this animationPhase ""Door05""<0.5";
                statement = "this animate [""Door05"", 1]";
            };
            class Door05_Close
            {
                displayName = "Close Door";
                position = "Door05_Trigger";
                radius = 3;
                onlyForPlayer = "true";
                condition = "this animationPhase ""Door05""==1";
                statement = "this animate [""Door05"", 0]";
            };
            class Door06_Open
            {
                displayName = "Open Door";
                position = "Door06_Trigger";
                radius = 3;
                onlyForPlayer = "true";
                condition = "this animationPhase ""Door06""<0.5";
                statement = "this animate [""Door06"", 1]";
            };
            class Door06_Close
            {
                displayName = "Close Door";
                position = "Door06_Trigger";
                radius = 3;
                onlyForPlayer = "true";
                condition = "this animationPhase ""Door06""==1";
                statement = "this animate [""Door06"", 0]";
            };
            class Door07_Open
            {
                displayName = "Open Door";
                position = "Door07_Trigger";
                radius = 3;
                onlyForPlayer = "true";
                condition = "this animationPhase ""Door07""<0.5";
                statement = "this animate [""Door07"", 1]";
            };
            class Door07_Close
            {
                displayName = "Close Door";
                position = "Door07_Trigger";
                radius = 3;
                onlyForPlayer = "true";
                condition = "this animationPhase ""Door07""==1";
                statement = "this animate [""Door07"", 0]";
            };
            class Door08_Open
            {
                displayName = "Open Door";
                position = "Door08_Trigger";
                radius = 3;
                onlyForPlayer = "true";
                condition = "this animationPhase ""Door08""<0.5";
                statement = "this animate [""Door08"", 1]";
            };
            class Door08_Close
            {
                displayName = "Close Door";
                position = "Door08_Trigger";
                radius = 3;
                onlyForPlayer = "true";
                condition = "this animationPhase ""Door08""==1";
                statement = "this animate [""Door08"", 0]";
            };
        };
        actionBegin1 = "Door01_Open";
        actionEnd1 = "Door01_Open";
        actionBegin2 = "Door02_Open";
        actionEnd2= "Door02_Open";
        actionBegin3 = "Door03_Open";
        actionEnd3 = "Door03_Open";
        actionBegin4 = "Door04_Open";
        actionEnd4 = "Door04_Open";
        actionBegin5 = "Door05_Open";
        actionEnd5 = "Door05_Open";
        actionBegin6 = "Door06_Open";
        actionEnd6 = "Door06_Open";
        actionBegin7 = "Door07_Open";
        actionEnd7 = "Door07_Open";
    };
};
class cfgMods
{
    author = "76561198278967672";
};

 

model.cfg:

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

    class Land_CG_CityBank_A: Default
    {
        skeletonName = "Land_CG_CityBank_A_skeleton";
        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;
            };
            class Door04_rot: Door01_rot
            {
                selection       = Door02;
                axis            = Door02_Axis;
            };
            class Door05_rot: Door01_rot
            {
                selection       = Door02;
                axis            = Door02_Axis;
            };
            class Door06_rot: Door01_rot
            {
                selection       = Door02;
                axis            = Door02_Axis;
            };
            class Door07_rot: Door01_rot
            {
                selection       = Door02;
                axis            = Door02_Axis;
            };
            class Door08_rot: Door01_rot
            {
                selection       = Door02;
                axis            = Door02_Axis;
            };
        };
    };
};

 

Anyone know the cause and a fix?

Share this post


Link to post
Share on other sites

Look at your code formatting in your post. Using the code tab it colours the text in different colours given its state/type.

You have a shit tone of blocks of green in various statements because you're missing quotation marks in various useraction statements. Try correcting those and see if that helps...

Share this post


Link to post
Share on other sites

One major thing I see right away is that your model name p3d and the class name of your model are not the same. They *must* be the same or they will not work

Share this post


Link to post
Share on other sites

Have fixed the speechmarks and a missing semi-colon that didn't fix it will try m1lkm8ns suggestion now

Share this post


Link to post
Share on other sites

Have tried both of these neither worked the doors vertex groups are correct (Door0# - Door0#_Axis - Door0#_Trigger)

Share this post


Link to post
Share on other sites

Have fixed the speechmarks and a missing semi-colon that didn't fix it will try m1lkm8ns suggestion now

Mine is not a suggestion though. The class name and the p3d name must be the same or animations will not work

  • Like 1

Share this post


Link to post
Share on other sites

Mine is not a suggestion though. The class name and the p3d name must be the same or animations will not work

Yer I just meant I was doing what you said. It didnt work (I have kept it that way in the config though)

Share this post


Link to post
Share on other sites

Yes I just noticed that your configs are not really correct. Give me a minute. Let me try and fix some things

Share this post


Link to post
Share on other sites

Yes I just noticed that your configs are not really correct. Give me a minute. Let me try and fix some things

Ok thanks in advance

Share this post


Link to post
Share on other sites

model config:

http://pastebin.com/Dc3MGqCR

 

main config: http://pastebin.com/N9D1RhBZ

 

try this..i didn't add all the classes because the forum was giving me trouble.....shakes fist at bis!!!!!

 

I changed the named of the classes and bone names in the model config for consistency...you will need to change the bone names in the model to match...I recommend it.....for instance for my door names it starts with Door_01, then in the memory config I have Door_01_Axis and Door_01 memory point for the trigger of the action. then its easier to keep track of everything...anyway try this any see how it works

  • Like 1

Share this post


Link to post
Share on other sites

Do you get the options to open/close door? If so you may have to reverse the values in the statements. If you want just zip everything up and post a Dropbox link so we can take a look

Share this post


Link to post
Share on other sites

Do you get the options to open/close door? If so you may have to reverse the values in the statements. If you want just zip everything up and post a Dropbox link so we can take a look

I get the open option i tried reversing the values in the statements with no change in outcome

Share this post


Link to post
Share on other sites

You must have class = house in your get lod name selection

Share this post


Link to post
Share on other sites

This thread can be closed as the issue was to do with object builder doing something (idk what) i reinstalled the tools and it worked thanks everyone for the advice and help

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

×