stu 0 Posted October 26, 2004 I'm trying to get two doors to work with no joy. I can get one working allright. I've tryed Searching the forums  i only found one topic about double sliding doors but not much help. I'm new to config.cpp Files. the cpp file i'm using is from BRSSEBs Animation tutorial i just moded it abit. Heres the cpp code. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> /*  Animation tutorial (#9) by BRSSEB, 23.07.03 */ #define TEast 0 #define TWest 1 #define TGuerrila 2 #define TCivilian 3 #define TSideUnknown 4 #define TEnemy 5 #define TFriendly 6 #define TLogic 7 #define true 1 #define false 0 #define private 0 #define protected 1 #define public 2 class CfgPatches { class coms { units[] = {coms}; weapons[] = {}; requiredVersion = 1.85; }; }; class CfgVehicles { class All{}; class Static: All{}; class Building: Static{}; class Strategic: Building{}; class Fortress1: Strategic{}; class coms : Fortress1 { model="\coms\coms"; armor=2000; scope=2; displayName="gdi coms";  animated=1; class Animations { // Side (slide-style) door class side_Door1 { type="rotation"; animPeriod=2; selection="side_door1"; axis="side_door1_axis"; angle0=0; angle1=-0.033;                    }; // Side (slide-style) door class side_Door2 { type="rotation"; animPeriod=2; selection="side_door2"; axis="side_door2_axis"; angle0=0; angle1=-0.033; }; }; /* Animation class end */ // Useraction class class UserActions { class OpenSideDoor       { displayName="Open Door2"; position="pos_side_door"; radius=2.000000; condition="this animationPhase ""ani_sideDoor"" < 0.5"; statement="this animate [""ani_sideDoor"", 1]"; }; class CloseSideDoor { displayName="Close Door2"; position="pos_side_door"; radius=2.000000; condition="this animationPhase ""ani_sideDoor"" >= 0.5"; statement="this animate [""ani_sideDoor"", 0]"; }; };   /* Useraction class end */ // Eventhandler class class eventhandlers { init="(_this select 0) animate [""ani_radarDome"", 1]"; }; }; /* Model class end*/ }; /* CfgVehicle class end*/ Any help would be great Share this post Link to post Share on other sites
csj 0 Posted October 27, 2004 Quote[/b] ]class OpenSideDoor      { displayName="Open Door2"; position="pos_side_door"; radius=2.000000; condition="this animationPhase ""ani_sideDoor"" < 0.5"; statement="this animate [""ani_sideDoor"", 1]"; }; I am suprised that any of the doors open  I would have something like this if you want the doors to open together. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class OpenSideDoor      { displayName="Open Door2"; position="pos_side_door"; radius=2.000000; condition="this animationPhase ""side_Door1"" < 0.5"; statement="this animate [""side_Door1"", 1]; this animate [""side_Door2"", 1]"; }; or seperately <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class OpenSideDoor1      { displayName="Open Door1"; position="pos_side_door"; radius=2.000000; condition="this animationPhase ""side_Door1"" < 0.5"; statement="this animate [""side_Door1"", 1]"; }; class OpenSideDoor2      { displayName="Open Door2"; position="pos_side_door"; radius=2.000000; condition="this animationPhase ""side_Door2"" < 0.5"; statement="this animate [""side_Door2"", 1]"; }; Also depending on how you setup your axis. With one of the doors you might need to reverse the angle so they both open in or out together. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">angle1=-0.033; Just removing the minus sign will do this for you. Share this post Link to post Share on other sites
stu 0 Posted October 28, 2004 Only one of the doors worked but when i added the seconed bit of code for the seconed door they did'nt work. But now they do Thanks to your help. Share this post Link to post Share on other sites
stu 0 Posted November 23, 2004 i'm back with one more door problem.  This time i've got two  Double sliding doors the first doors work ok, But the second doors don't work right, if i try to open the second doors they don't open, But if the first doors are open and i try the second doors they open ok.  Here's the code <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> animated=1; class Animations { // Side (slide-style) door class side_Door1 { type="rotation"; animPeriod=2; selection="side_door1"; axis="side_door1_axis"; angle0=0; angle1=-0.033;             }; // Side (slide-style) door class side_Door2 { type="rotation"; animPeriod=2; selection="side_door2"; axis="side_door2_axis"; angle0=0; angle1=+0.033;        }; // Side (slide-style) door class side_Door3 { type="rotation"; animPeriod=2; selection="side_door3"; axis="side_door3_axis"; angle0=0; angle1=-0.033;             }; // Side (slide-style) door class side_Door4 { type="rotation"; animPeriod=2; selection="side_door4"; axis="side_door4_axis"; angle0=0; angle1=+0.033; }; }; /* Animation class end */ // Useraction class class UserActions { class OpenDoors1         {            displayName="Open Door";            position="pos_side1_door";            radius=2.000000; condition="this animationPhase ""side_Door1"" < 0.5"; statement="this animate [""side_Door1"", 1]; this animate [""side_Door2"", 1]";             }; class CloseDoors1       { displayName="Close Door"; position="pos_side1_door"; radius=2.000000; condition="this animationPhase ""side_Door1"" >= 0.5"; statement="this animate [""side_Door1"", 0]; this animate [""side_Door2"", 0]"; };                       class OpenDoors2         {            displayName="Open Door";            position="pos_side2_door";            radius=2.000000;      condition="this animationPhase ""side_Door2"" < 0.5"; statement="this animate [""side_Door3"", 1]; this animate [""side_Door4"", 1]";             }; class CloseDoors2 { displayName="Close Door"; position="pos_side2_door"; radius=2.000000; condition="this animationPhase ""side_Door2"" >= 0.5"; statement="this animate [""side_Door3"", 0]; this animate  [""side_Door4"", 0]"; }; Again Any help would be great. Share this post Link to post Share on other sites
csj 0 Posted November 23, 2004 Did you copy and paste from the origional doors. If so you may have to redefine the named selections and osa points in O2. Share this post Link to post Share on other sites