Home   Help Search Login Register  

Author Topic: AI Opening Doors???  (Read 573 times)

0 Members and 1 Guest are viewing this topic.

JDSH

  • Guest
AI Opening Doors???
« on: 28 May 2003, 03:27:11 »
       Hello Ive been trying for a while to get AI soldiers to open doors I'm trying to get it so my jeep or AI jeep activates a trigger that opens like this garage door and then closes it when jeeps inside but I cant seem to do it
Ive used    player action["Open Door"]     player action ["Open"]   etc....  lots of other things but I cant seem to get them to open them for cutseens and other stuff"

        If anyone can Help Thanks!!
« Last Edit: 28 May 2003, 05:31:47 by JDSH »

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:AI Opening Doors???
« Reply #1 on: 28 May 2003, 11:04:36 »
I don't think its an action.   I have a feeling you have to animate the door .... can't remember how though.   Try the forum search function.
Plenty of reviewed ArmA missions for you to play

JDSH

  • Guest
Re:AI Opening Doors???
« Reply #2 on: 29 May 2003, 19:37:26 »
Thank You I was trying to use the playerOne action ["Open Door",Door1]
command until I went to the Official Command Reference and looked up how to use the animate Command------
-------------------------------------------------
object animate [animation, phase]
Operand types:
    object: Object
    [animation, phase]: Array
Compatibility:
    Version 1.75 required.
Type of returned value:
    Nothing
Description:
    Process animation on object. Animation is defined in config file. Wanted animation phase is set to phase.

Example:
    house animate ["doors1", 1]
-------------------------------------------------------------
 and I made a script called
Door.sqs --
----------------------------------------------------------
;Did it this way so I can use same script for as many doors that I want to
;Name of door
_door = _this select 0
;Defined Animation in Config.cpp file of Addon Used
_hnge1 = _this select 1      
;Define Animation Usually 1 or 0   1 for OPEN  0 for CLOSED
_mve = _this select 2
;Animate Command
_door animate [_hnge1,_mve]
-------------------------------------------------------------

Then UNPBOed the Addon that had the bunker walls wit  doors ----
(((bauelementev01.pbo)))
and opened the Config.cpp file in notepad and found the part that defined
the animation of this particular door-----------------
//-------------------- Door1 3M -------------------------------------------------------------------

class Z_Door_03M_witdoor : Fortress1{model="\BauElementeV01\Z_Door_03M_witdoor.p3d";
armor=1000000;
scope=2;
vehicleClass="Z_Bunker-Baukasten";
icon="Unknown_object";
displayName="Z_Door_03M_witdoor";  animated=1
class Animations
{
class Component07
{
type="rotation";
animPeriod=1
selection="Component07";       <-------DEFINED ANIMATION -->("Component07")
axis="Achse01";
angle0=0
angle1=-1.600000;
};
};
class UserActions
{
class OpenDoors
{
displayName="Open Door";
position="Achse01";
radius=3.000000;
condition="this animationPhase ""Component07"" < 0.5";
statement="this animate [""Component07"", 1]";
};
class CloseDoors
{
displayName="Close Door";
position="Achse01";
radius=3.000000;
condition="this animationPhase ""Component07"" >= 0.5";
statement="this animate [""Component07"", 0]";
};
};
};
-----------------------------------------------------------------------------------------
Named Door (door1)

Then I made a Trigger Around The Door which I wanted AI or a player to Be Able to open ---
----------------------------------------------------------------------------
(Axis a (6))  (Axis b (1))
                   RECTANGLE
Activation [Anybody]          [Repeatedly]
[Present]

Type [Switch]
Condition [This]
 
On Activation        [    [door1,"Component07",1] exec "Door.sqs"    ]
On Deactivation    [    [door1,"Component07",0] exec "Door.sqs"   ]

                                      EXPLANATION--------------------------------------
                                  (((Array Defined)))
 [NameOfDoor , AnimationDefinedInConfig.cppOfAddonUsed ,
(1)ForOpen (0)ForClosed AlsoDefinedInConfig.cpp] exec "Door.sqs"
-------------------------------------------------------------------------------------
THANK YOU !!!!
                JUST WROTE THIS FOR SOMEBODY WITH SAME QUESTION