Jump to content
Sign in to follow this  
FAR-Warrior

Open gate

Recommended Posts

How to open a gate (kkb_gate), i know it's with command animationPhase and animate but i have some bugs...

Thx

Share this post


Link to post
Share on other sites

To open the arm:

gatename animate ["arm", 1]

to close it:

gatename animate ["arm", 0]

put this into the script or in OnActivation of trigger.

Share this post


Link to post
Share on other sites

How would you make a trigger so that it opens when a west (or east) vehicle comes near it, and closes after it is through?

Share this post


Link to post
Share on other sites

setup two triggers on both sides of the gate

set activation to the side of your vehicles, use repeadetly to make it working for traffic.

by default the gate should be closed

Now out this into OnActivation of trigger on the side where your vehicles come from:

gatename animate ["arm", 1]

put a second trigger behind the gate set it up like the other one and put this into OnActivation:

gatename animate ["arm", 0]

This will close the gatearm if vehicle passes through gate and procceeds.

Note :

You will have to setup the waypoints of the vehicles so that they stop in front of the gatearm and wait for a certain time, so that the gate arm has time to open.

Do this by using the timout fields within waypoint window.

Share this post


Link to post
Share on other sites

I did a thing like that once, the time went by, some vehicles got stuck in the gate (there are drunk AI drivers in OFP) ... wow.gif so i updated my script so that i saved the vehicle's name before and checked after the gate that it had passed the gate. So the gate opened when car get in front (whatever side of the car and of the gate) and closed when ca got through. The script got big. A convoy going through was worth 15mn waiting (2 cars, 3 trucks & bmp). So i switched to a non-generic script : one mission = one script. With names hard coded in it. tounge.gif

Gate opens when first comes and closes when last go through (much more realist than one by one, looked like CPCharlie 20 years ago.).

I know it's dirty programming, but what an ease to do and to use. wink.gifxmas.gif

Share this post


Link to post
Share on other sites

hmm.......animate ["arm", 1]?

Does that mean if i create a model and name the selected vertices(a door) - arm - i can simulate the door opening?

(Of course in this case the xyz co-ords of the door will be different from the real gate to simulate a real door opening effect.)

Share this post


Link to post
Share on other sites

Doors would be cool in OFP.

Originally, the kind existing (AFAIK) is a piece of wood that a private can move up (or not) when you come close (scripted).

The only thing funny is to get him stand and salute you as you pass ... b tounge.gif

Great doors and portals with a sound of old wood cracking when you activate them.... wow.gifxmas.gif

Share this post


Link to post
Share on other sites

animations can be done. There is a program out right for christmas to add animations to units and models. Check the Addon section of the Forum for the program.

Download the program here:

http://www.aef-kampagne.de/german/downloads/OFPAnim_0.93_full.zip

and the Models from Demo in editable state here:

http://www.aef-kampagne.de/Tmp/DemoModells.zip

Share this post


Link to post
Share on other sites

I used 2 triggers

activation present open

activation not present close

seems to work ok

Share this post


Link to post
Share on other sites

You dig out a more then 4 year old thread just to tell us that the posted solution is working?!

Share this post


Link to post
Share on other sites

The posted "solution" used two activation present triggers, when I tried it had some issues. The use of not present didn't result in any problems. I should have made my post clearer. whistle.gif

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  

×