wass24 0 Posted February 2, 2004 I have a gate that I have configured to open in the center. Â Currently I have to open one side and then the other and close one then the other. Â How can I configure it to open and close both sides at the same time using the action menu? This is my current user action config: class CfgVehicles{ class All{}; class Static: All{}; class Building: Static{}; class Strategic: Building{}; class Fortress1: Strategic{}; class Gate3_anim : Fortress1 { model="\Gate3_anim\Gate3_anim"; armor=2000; scope=2; displayName="Gate3_anim"; Â animated=1; class Animations { // gate1 animation class class ani_gate1 { type="rotation"; animPeriod=5; selection="gate1"; axis="gate1_axis"; angle0=0; angle1=-1.5; }; // gate2 door class ani_gate2 { type="rotation"; animPeriod=5; selection="gate2"; axis="gate2_axis"; angle0=0; angle1=1.5; }; }; /* Animation class end */ // Useraction class class UserActions { class Opengate1 { displayName="Open Gate 1"; position="pos_gate"; radius=2.000000; condition="this animationPhase ""ani_gate1"" < 0.5"; statement="this animate [""ani_gate1"", 1]"; }; class Closegate1 { displayName="Close Gate 1"; position="pos_gate"; radius=2.000000; condition="this animationPhase ""ani_gate1"" >= 0.5"; statement="this animate [""ani_gate1"", 0]"; }; class Opengate2 { displayName="Open Gate 2"; position="pos_gate"; radius=2.000000; condition="this animationPhase ""ani_gate2"" < 0.5"; statement="this animate [""ani_gate2"", 1]"; }; class Closegate2 { displayName="Close Gate 2"; position="pos_gate"; radius=2.000000; condition="this animationPhase ""ani_gate2"" >= 0.5"; statement="this animate [""ani_gate2"", 0]"; }; Share this post Link to post Share on other sites
Guest Posted February 3, 2004 You mean one action that opens both gates simultaineously, and then can close them both simultaineously? No idea to be honest...but my guess would be to have a user action that activates a script which contains the animations, rather than having the animations in the config. I don't recall an object that has two animations running at the same time from one Action...but I've been wrong before Share this post Link to post Share on other sites
wass24 0 Posted February 3, 2004 How would you configure a user action to activate a script? In my case, how do you configure it to activate two animations? Share this post Link to post Share on other sites
Sgt_Wilson 0 Posted February 3, 2004 You can use a semicolon to seperate the commands for your statement, and And for your condition: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class Opengates { displayName="Open Gates"; position="pos_gate"; radius=2.000000; condition="(this animationPhase ""ani_gate1"" < 0.5) And (this animationPhase ""ani_gate2"" < 0.5)"; statement="this animate [""ani_gate1"", 1] Â ; this animate [""ani_gate2"", 1]"; }; Share this post Link to post Share on other sites
wass24 0 Posted February 3, 2004 Thanks for your help, but only one side of the gate would open. Any other ideas? Share this post Link to post Share on other sites
Sgt_Wilson 0 Posted February 3, 2004 Dont know, unless for some reason OFP cant play two anims at the same time. If not sounds like something else is screwed. Share this post Link to post Share on other sites