Jump to content
Sign in to follow this  
lucki

Open Gate

Recommended Posts

Hello all,

I have been trying to find a solution with animate command, without success.

In Altis Map, North of Charkia, there is a warehouse complex. I am tring to have the gates at the east of the complex totally open (there are 2 of them).

Does anybody know how to do that?

Share this post


Link to post
Share on other sites

Place a gameLogic near to the gate and place this in its init.

nul = this spawn {
_obj = (getpos _this) nearestObject 557150;
{
	_obj animate [ format [ "door_%1_rot", _x ], 1 ];
}forEach [ 1, 2 ];
};

Where 557150 is the ID of the gate, which can be seen by using the ID button in the editor.

OR

nul = this spawn {
_obj = nearestObject [ (getpos _this), "Land_Net_Fence_Gate_F" ];
{
	_obj animate [ format [ "door_%1_rot", _x ], 1 ];
}forEach [ 1, 2 ];
};

Which is the same as above except it gets the object by TYPE rather than ID. This means you could just copy and paste this gameLogic near any gate of this type and it will open the gates at mission start.

Edited by Larrow

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  

×