Home   Help Search Login Register  

Author Topic: Can AI open doors (empty objects)  (Read 1191 times)

0 Members and 1 Guest are viewing this topic.

Offline Andre1983

  • Members
  • *
Can AI open doors (empty objects)
« on: 09 Nov 2008, 15:24:40 »
Hi to all!

I am working on a Jurassic Park mission.

http://ofp.gamepark.cz/index.php?showthis=8926

And it got as empty objects alot of fences and gates.

can the AI open a gate?


André de Jong

i found this in a config

Code: [Select]
class CfgPatches
{
class JP_cardoor
{
units[] = {JP_cardoor,JP_fench};
weapons[] = {};
requiredVersion = 1.0;
};
};
class CfgVehicles
{
class All {};
class Static: All {};
class Building: Static {};
class NonStrategic: Building {};
class TargetTraining: NonStrategic {};
class TargetGrenade: TargetTraining {};
class JP_fench: TargetGrenade
{
model="\JP_cardoor\JP_fench";
armor=20000;
scope=2;
                vehicleClass="Jurassic Park";
displayName="Perimiter Fence";
};
        class JP_cardoor: TargetGrenade
{
model="\JP_cardoor\JP_cardoor";
armor=20000;
scope=2;
                icon="\JP_cardoor\fench1.paa";
                vehicleClass="Jurassic Park";
displayName="Perimiter Fence";           animated=1
        class Animations
{
class door1
{
type="rotation";
animPeriod=3
selection="door1";
axis="a_door1";
angle0=0
angle1=1.60000;
};
        class door2
{
type="rotation";
animPeriod=3
selection="door2";
axis="a_door2";
angle0=0
angle1=-1.60000;
};
                        class door3
{
type="rotation";
animPeriod=3
selection="door3";
axis="a_door3";
angle0=0
angle1=-1.60000;
};
                        class door4
{
type="rotation";
animPeriod=3
selection="door4";
axis="a_door4";
angle0=0
angle1=1.60000;
};
};
class UserActions
      {
         class OpenDoors
         {
            displayName="Open Doors";
            position="mitte";
            radius=20.500000;
            condition="((this animationPhase ""door1"") <= 0.5) && ((this animationPhase ""door2"") <= 0.5) && ((this animationPhase ""door3"") <= 0.5) && ((this animationPhase ""door4"") <= 0.5)";
            statement="this animate [""door1"", 1]; this animate [""door2"", 1]; this animate [""door3"", 1]; this animate [""door4"", 1]";
         };
         class CloseDoors
         {
            displayName="Close Door";
            position="mitte";
            radius=20.500000;
            condition="((this animationPhase ""door1"") >= 0.5) && ((this animationPhase ""door2"") >= 0.5) && ((this animationPhase ""door3"") >= 0.5) && ((this animationPhase ""door4"") >= 0.5)";
            statement="this animate [""door1"", 0]; this animate [""door2"", 0]; this animate [""door3"", 0]; this animate [""door4"", 0]";
         };
      };
   }
}









Walter_E_Kurtz

  • Guest
Re: Can AI open doors (empty objects)
« Reply #1 on: 10 Nov 2008, 01:54:17 »
I think I am correct in saying no - AI tend to bump their way through rather than open the door.

The mission creator would have to set up a trigger (Anybody present, Repeatedly) to animate the doors.

I believe that many of the buildings added by the Resistance expansion pack (ie. found on Nogova) have doors that can be animated shut, but that are left open by default - can't remember where I read that though.