xnodunitx 0 Posted December 4, 2006 Usually configing isn't my thing and I still think it isn't,anyway I'v been trying to get this animation line working,and after several tries I managed to get ingame with no problems,however the door animation that was supposed to be on the action menu is not displayed. // some basic defines #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 // type scope #define private 0 #define protected 1 #define public 2 class CfgPatches { class Jeep_Wrangler { units[] = {Jeep_Wrangler}; weapons[] = {horn}; requiredVersion = 1.96; }; }; class CfgModels { class default {}; class Vehicle: default {}; class Car: Vehicle {}; class JeepWrangler: Car {}; }; class CfgVehicles { class All {}; class AllVehicles: All {}; class Land: AllVehicles {}; class LandVehicle: Land {}; class Car: LandVehicle {}; class jeepwrangler: Car { soundEngine[]={"\JPjeep\sound\eng.wav",db+10,2 }; hasDriver=1; displayName="Jeep Wrangler"; model=\JPjeep\JPjeep.p3d; camouflage=5; armor = 40; vehicleclass = "JP vehicles" side = 3; scope=2; fuelCapacity = 65; type=VArmor cost=100000; transportAmmo=1; transportSoldier=1; hasgunner=0; //weapons[]={"9mmmgveh"}; //magazines[]={"9mmmgveh"}; dammageHalf[]={}; armorGlass=0.6; armorWheels=0.2; driverCastShadow = true; damperSize=0.100000; damperForce=20 brakeDistance=6.00 maxSpeed=160; unitInfoType="UnitInfoCar"; //class TurretBase //{ //gunAxis = "OsaHlavne"; //turretAxis = "OsaVeze"; //soundServo[]={"",1.0}; //gunBeg = "usti hlavne"; //gunEnd = "konec hlavne"; //minElev=-50; //maxElev=+70; //minTurn=-80; //maxTurn=+80; //body = "OtocVez"; //gun = "OtocHlaven"; //}; driverAction="ManActJeepDriver"; //gunnerAction="ManActJeepGunner"; hasCommander=0; class Animations { class frontdoor1 { type="rotation"; animperiod=3; selection="driver_door"; axis="osa_driverdoor"; angle0=0; angle1=1.4; }; }; }; Share this post Link to post Share on other sites
sanctuary 19 Posted December 4, 2006 You need to add an UserActions class just after the class Animations of your jeepwrangler, if you want the open/close door action to be displayed in the action menu By example, the left door open/close user action from the BAS pavehawk is controled by this useractions class : <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> class UserActions { class OpenLeftDoor { displayName = "Open Door"; position = "posdoorl"; radius = 2; condition = " !(player in this) && (getdammage this)<0.9 && this animationPhase {sidedoorl}==1"; statement = "this animate [{sidedoorl}, 0]"; }; class CloseLeftDoor { displayName = "Close Door"; position = "posdoorl"; radius = 2; condition = " !(player in this) && count ((crew this)-[driver this,gunner this])<= 6 && (getdammage this)<0.9 && this animationPhase {sidedoorl}==0"; statement = "this animate [{sidedoorl},1]"; }; }; Share this post Link to post Share on other sites
xnodunitx 0 Posted December 4, 2006 So I should have something like this? class Animations { class UserActions { class frontdoor1 { displayName="Open driver door"; position="actionarea"; radius=5; condition="this animationPhase ""driverdoor"" >= 0.9 and player in this"; statement="this animate [""driverdooranimation"",1]"; }; type="rotation"; animperiod=3; selection="driver_door"; axis="osa_driverdoor"; angle0=0; angle1=1.4; }; }; }; I still don't see anything,configs really aren't my thing but I don't want to press it onto another to do it and I'd like to learn how to make a basic,atleast basic animations with it. Share this post Link to post Share on other sites
sanctuary 19 Posted December 4, 2006 Try like this : <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class jeepwrangler: Car { soundEngine[]={"\JPjeep\sound\eng.wav",db+10,2}; hasDriver=1; displayName="Jeep Wrangler"; model=\JPjeep\JPjeep.p3d; camouflage=5; armor = 40; vehicleclass = "JP vehicles" side = 3; scope=2; fuelCapacity = 65; type=VArmor cost=100000; transportAmmo=1; transportSoldier=1; hasgunner=0; //weapons[]={"9mmmgveh"}; //magazines[]={"9mmmgveh"}; dammageHalf[]={}; armorGlass=0.6; armorWheels=0.2; driverCastShadow = true; damperSize=0.100000; damperForce=20 brakeDistance=6.00 maxSpeed=160; unitInfoType="UnitInfoCar"; //class TurretBase //{ //gunAxis = "OsaHlavne"; //turretAxis = "OsaVeze"; //soundServo[]={"",1.0}; //gunBeg = "usti hlavne"; //gunEnd = "konec hlavne"; //minElev=-50; //maxElev=+70; //minTurn=-80; //maxTurn=+80; //body = "OtocVez"; //gun = "OtocHlaven"; //}; //gunnerAction="ManActJeepGunner"; driverAction="ManActJeepDriver"; hasCommander=0; animated = 1; class Animations { class frontdoor1 { type="rotation"; animperiod=3; selection="driver_door"; axis="osa_driverdoor"; angle0=0; angle1=1.4; }; }; class UserActions { class OpenFrontDoor { displayName="Open driver door"; position="actionarea"; radius = 5; condition="this animationPhase {driverdoor} >= 0.9 && (player in this)"; statement="this animate [{driverdooranimation},1]"; }; class CloseFrontDoor { displayName="Close driver door"; position="actionarea"; radius = 5; condition="this animationPhase {driverdoor} <= 0.9 && (player in this)"; statement="this animate [{driverdooranimation},0]"; }; }; }; Note : position="actionarea"; radius = 5; that part can be important, i remember i had a hell to make one action appear, as for an action allowing the pilot of a BIS modified su25 to play a music, i got the radius not big enough, and the position=... totally wrong , making the action not appearing. Share this post Link to post Share on other sites
xnodunitx 0 Posted December 4, 2006 Tried to replicate it to yours and failed miserably,copied and it works to an extent. I can close the door as much as I want from within,however once I get out then I can't interact with it at all. And oddly enough there is no "open door" option,I can't detect any difference between the "open" and "close" door coding lines The fact that I can close the door from inside but not outside is leading me to believe that I screwed up the axis in O2,as if its reversed,looking into that but the no open door makes no sense. Well thats not it,reversing the faces didn't seem to change the ability to close the door from inside but not outside. Share this post Link to post Share on other sites
Planck 1 Posted December 4, 2006 Might or might not be related to your problem, but cfgModels is not quite right: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> class JeepWrangler: Car {}; Should of course read something like: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> class JPjeep: Car {}; EDIT: Almost forgot, you could also try changing cfgPatches from: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> class Jeep_Wrangler { units[] = {Jeep_Wrangler}; weapons[] = {horn}; requiredVersion = 1.96; }; }; To: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> class JPjeep { units[] = {jeepwrangler}; weapons[] = {horn}; requiredVersion = 1.96; }; }; Planck Share this post Link to post Share on other sites
sanctuary 19 Posted December 4, 2006 however once I get out then I can't interact with it at all For this one, it is normal, one of the condition for this action is (player in this) , so the action does not appear out of the vehicle. For the problem , previously i have not closely checked just copy pasted your idea, but now i see the problem may exist because of this : condition="this animationPhase {driverdoor} [...] "; statement="this animate [{driverdooranimation},1]"; class Animations { class frontdoor1 I think there is something very wrong there. If you have defined the animation as being frontdoor1 , the condition and statement should use frontdoor1 , not "driverdoor" or "driverdooranimation" and previously the >= and <= may not be correct So overall it should then be : <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> class UserActions { class OpenFrontDoor { displayName="Open driver door"; position="actionarea"; radius = 5; condition="this animationPhase {frontdoor1} <= 0.9 && (player in this)"; statement="this animate [{frontdoor1},1]"; }; class CloseFrontDoor { displayName="Close driver door"; position="actionarea"; radius = 5; condition="this animationPhase {frontdoor1} >= 0.9 && (player in this)"; statement="this animate [{frontdoor1},0]"; }; }; the only thing i am not sure at all is position="actionarea"; Share this post Link to post Share on other sites
xnodunitx 0 Posted December 4, 2006 The help from you two and my friend has pulled me through,it works,I can now open and cloose the door from inside. I rather like this,doesn't crowd up the action menu and makes more sense. I am rather ashamed to have asked for your help in honesty,as much as I would like to dedicate weeks to learning all of this,I'm so behind on many things that I cannot quite afford that. But as I progress I will take note of the things I'v been taught so far and use them as best I can. There is one last thing I would like to ask. It probably has nothing to do wth config but I don't think it requires a whole new topic...I added headlights to the jeep and they work fine,but didn't look right without a texture. So I used the BISjeep with the machine gun's headlight texture,the flares. However it seems that it shows up in day and night regardless,I skimmed through configs and found nothing on this flare texture file,I went back into O2 and checked its selection and redefined it but nada. This would be the last thing I would ask of you if I can help it. Share this post Link to post Share on other sites