Jump to content
william516

Arma 3 Sahrani Map Airbase Bargates do not respond or work through script

Recommended Posts

I have been going nuts trying to figure this out.  Working on a mission and this bargate is driving me nuts.  All I'm trying to do is get the gate to go up when a BLUFOR unit goes into the trigger.  I had no problem with this in the ARM2 realm but it seems that the object itself is already part of the base.  Most of the tutorials are dealing with placable objects in the editor.  This is actually part of the base.  If I'm correct there are three total.

 

I used the editor to get the ID of the object and have tried the following command in a trigger.

 

(position GATE_1 nearestObject 560949) animateSource ["Door_1_sound_source", 1]; //Open    =======>  this statement here gives an error and will not stay in the trigger

 

I grabbed this script from the website and modified it.  This script here is actually returning an error and does not work it all.  According to bohemia they are telling us not to use the animate command anymore but rather to use the animatesource command.  I have tried the following but am lost now.

 

I created a trigger and set the properties to be repetitive and operated by blufor.  I then had named my trigger variable "GATE_!"  I placed the trigger right near or ontop of the bargate I'm attempting to operate.

I then placed the line above in the Act field 

 

I also attempted to use this format as well

ACT: (position GATE_1 nearestObject 560949) animate ["Door_1_rot", 1];    ======.  These statements work but do not actually open the gate at all

DEACT  (position GATE_1 nearestObject 560949) animate ["Door_1_rot", 0]; 

 

 

The object ID according to the editor is 560949  It is the gate that leads out onto the Tarmac and runway area of the airfield.  I tried other methods using the animate command instead and still had no results.  I even created a game logic and tried using the game logic.

 

All attempts seem to do nothing at all.

 

Hoping someone might have a solution.  I have confirmed that the bargate in question can be operated and is not simply a static gate.  It can be opened via player control.

 

Thank you for any help.

 

Bill

  • Thanks 1

Share this post


Link to post
Share on other sites

tested with the bar gate on [9525.7,9925.8,0]

Placed a repeatable trigger BLUFOR present centered on gate:

on act: (getpos thisTrigger nearestObject "Land_Zavora") animateSource ["Door_1_sound_source", 1]

on deact: (getpos thisTrigger nearestObject "Land_Zavora") animateSource ["Door_1_sound_source", 0]

 

 

  • Thanks 1

Share this post


Link to post
Share on other sites

I just use a composition which consists of a remove object module, a bargate and a trigger to open that bargate.

I just find it much easier to just remove the bargate on the map and place a new one that I can name, disable damage, and trigger easily.

Share this post


Link to post
Share on other sites

Can I just add a note that CUP maps (and those based on CUP maps core, like Falluja) have two "bar gates".

  • Land_Zavora
  • Land_zavora_2

You need to choose the appropriate one when e.g.

On Activation:

getpos thisTrigger nearestObject "Land_zavora_2") animateSource ["Door_1_sound_source", 1]


On Deactivation:

(getpos thisTrigger nearestObject "Land_zavora_2") animateSource ["Door_1_sound_source", 0]

S

  • Like 1

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

×