Jump to content
Sign in to follow this  
Pogoman

remove open/close action from bargate

Recommended Posts

as it says in the title. when i place a bar gate in the editor i dont want the open gate/close gate action which pops up whenever you go near it. is there anyway to disable it or a way to find the action id so i can perma remove it?

Share this post


Link to post
Share on other sites

What is it you want to achieve?

That action is defined inside the config for that object, so you'd probably have to make it as an addon to remove the action completely.

Setting the gate as locked may give you that result, but it isn't likely.

If all you want to do is to prevent the gate from opening, you could have a script monitoring if it's open or closed and force it back to the state you want it in.

Useful commands for this: Animate and AnimationPhase.

Share this post


Link to post
Share on other sites

Well I tried running a function that checks to see if barGate is open, and if not, then closes it. Unfortunately, It didnt work the way I attempted it.

Could someone help me figure a way to remove the "Open gate" action by force, or possibly supplying a working function. Thanks.

Share this post


Link to post
Share on other sites

This is a script i used to lock a door within a building so it should also work for the bargate object. I adapted it for you so it should be possible to use it with the bargate object. You should name the gate object you wanna close mygate and then simply activate the script (this is in .sqf). If you wanna be able to open the gate simply make a trigger with lock= false in the on activation field. Note that whenever you do use the "open gate" action the gate will start going up and then immediatly close again.

lock = true;

while {lock}
do {
mygate animate ["Bargate",1];
sleep 0.01;
   };

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  

×