Jump to content
Sign in to follow this  
sdes

Animation problem

Recommended Posts

Hello.

This is the problem:

When I go next to the door that should open, the 'Open Door'  text does not appear in the action -menu. Only door number two (dvere2) works. I have checked .p3d file many times and there aren't (as far as I know) any problems, so I think that the problem is in Config file. Please can someone tell me what's wrong?

Config.cpp

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

class CfgModels

{

class Default {};

class sdes_shop1: Default

{

sections[]={"dvere1","dvere2","dvere3"};

sectionsInherit="";

};

};

class CfgPatches

{

class sdes_shop1

{

units[] = {sdes_shop1};

weapons[] = {};

requiredVersion = 1.75;

};

};

class CfgVehicles

{

class All {};

class Static: All {};

class Building: Static {};

class NonStrategic: Building {};

class House: NonStrategic {};

class sdes_shop1: House

{

               vehicleClass="Objects";

model="\sdes_house\shop1";

armor=1000;

scope=2;

displayName="[SDES]Shop1";

animated=1;

class Animations

{

class dvere1

{

type="rotation";

animPeriod=1;

selection="dvere1";

axis="osa_dvere1";

angle0=0;

angle1=1.6;

};

class dvere2

{

type="rotation";

animPeriod=1;

selection="dvere2";

axis="osa_dvere2";

angle0=0;

angle1=1.6;

};

class dvere3

{

type="rotation";

animPeriod=1;

selection="dvere3";

axis="osa_dvere3";

angle0=0;

angle1=-1.6;

};

};

class UserActions

{

class OpenDoor1

{

displayName="Open Backdoor";

position="osa_dvere1";

radius=2.5;

condition="this animationPhase ""dvere1"" < 0.5";

statement="this animate [""dvere1"", 1]";

};

class CloseDoor1

{

displayName="Close Backdoor";

position="osa_dvere1";

radius=2.5;

condition="this animationPhase ""dvere1"" >= 0.5";

statement="this animate [""dvere1"", 0]";

};

class OpenDoor2

{

displayName="Open Door ";

position="osa_dvere2";

radius=2.5;

condition="this animationPhase ""dvere2"" < 0.5";

statement="this animate [""dvere2"", 1]";

};

class CloseDoor2

{

displayName="Close Door";

position="osa_dvere2";

radius=2.5;

condition="this animationPhase ""dvere2"" >= 0.5";

statement="this animate [""dvere2"", 0]";

};

class OpenDoor3

{

displayName="Open Window";

position="osa_dvere3";

radius=2.5;

condition="this animationPhase ""dvere3"" <      0.5";

statement="this animate [""dvere3"", 1]";

};

class CloseDoor3

{

displayName="Close Window";

position="osa_dvere3";

radius=2.5;

condition="this animationPhase ""Dvere3"" >= 0.5";

statement="this animate [""dvere3"", 0]";

};

};

};

}

Share this post


Link to post
Share on other sites

Try creating new vertices for the first and second door, and name them "doorarea1" and "doorarea3", then changing the "position" in the cpp from "osa_dvere1" and "osa_dvere3" to "doorarea1" and "doorarea3". Thats about the only thing I can think of, because everything else appears to be fine, and almost certainly a model problem rather than a config problem.

Share this post


Link to post
Share on other sites

I tried that and it worked!

Thank you!

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  

×