Jump to content
XianGrim

Moving Checkpoint Gate

Recommended Posts

I haven't tested this in an MP setting, I would very surprised if it works as we all know Arma shows no love for anything that "moves" lol

Posting this for others, use however you see fit! Also, I'm sure some pro's on here are gonna probably cringe at my script lol Any suggestions to make it better are highly welcomed, I always looking to learn!

 

 

on the laptop:

Quote

this addAction ["Open Gate","gateControls\open.sqf"];


make a gateControls folder and add the open.sqf:
 

Quote

_laptop = _this select 0;

_laptopAction = _this select 2;

_time = time;

_laptop removeAction _laptopAction;

_gates = [gate_1,gate_2,gate_3,gate_4,gate_5];

hint "Gates Opening";

[gate_voice,["gate_control",25,1]] remoteExec ["say3D",0];

 

while {time < (_time + 3.4)} do

{

    gate_1 setpos [ getPos gate_1 select 0, getPos gate_1 select 1, (getPos gate_1 select 2) - 0.025];

    gate_2 setpos [ getPos gate_2 select 0, getPos gate_2 select 1, (getPos gate_2 select 2) - 0.025];

    gate_3 setpos [ getPos gate_3 select 0, getPos gate_3 select 1, (getPos gate_3 select 2) - 0.025];

    gate_4 setpos [ getPos gate_4 select 0, getPos gate_4 select 1, (getPos gate_4 select 2) - 0.025];

    gate_5 setpos [ getPos gate_5 select 0, getPos gate_5 select 1, (getPos gate_5 select 2) - 0.025];

    sleep 0.02;

};

 

{

    _x setpos [ getPos _x select 0, getPos _x select 1, -2.34];

} forEach _gates;

 

_laptop addAction ["Close Gate","gateControls\close.sqf"];

 
 


Next, the close.sqf:

Quote

_laptop = _this select 0;

_laptopAction = _this select 2;

_time = time;

_laptop removeAction _laptopAction;

_gates = [gate_1,gate_2,gate_3,gate_4,gate_5];

hint "Gates Closing";

[gate_voice,["gate_control",25,1]] remoteExec ["say3D",0];

 

while {time < (_time + 3.4)} do

{

    gate_1 setpos [ getPos gate_1 select 0, getPos gate_1 select 1, (getPos gate_1 select 2) + 0.025];

    gate_2 setpos [ getPos gate_2 select 0, getPos gate_2 select 1, (getPos gate_2 select 2) + 0.025];

    gate_3 setpos [ getPos gate_3 select 0, getPos gate_3 select 1, (getPos gate_3 select 2) + 0.025];

    gate_4 setpos [ getPos gate_4 select 0, getPos gate_4 select 1, (getPos gate_4 select 2) + 0.025];

    gate_5 setpos [ getPos gate_5 select 0, getPos gate_5 select 1, (getPos gate_5 select 2) + 0.025];

    sleep 0.02;

};

 

{

    _x setpos [ getPos _x select 0, getPos _x select 1, 0];

} forEach _gates;

 

_laptop addAction ["Open Gate","gateControls\open.sqf"];

 

 

 

The sound effect was custom, but I'll include the .pbo

Any questions, Discord is the easiest way to get a hold of me

https://discord.gg/jbwTKWx

 

https://www.dropbox.com/s/9n6xuhztqggkaty/concept_roadGate.VR.zip?dl=0 for the full pbo

  • Like 3

Share this post


Link to post
Share on other sites

Nice! Creative.

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

×