Jump to content
Sign in to follow this  
st3vouk

Another lock/unlock Question

Recommended Posts

Ok new here just started editing ArmA 2 ive made my first mission

ALL i want to do is for only one player to be able to get in a blackhawk ie. the pilot

I no how to do the lock false code with trigger BUT u have to make a trigger and put it around the BH witch once i fly away and land somewhere else anyone can jump in becouse the trigger is at base not around the BH anymore

so.. lol can someone tell me a simple code/way to get the only one player to be able to use the BH like i dont no what the code would be or where to put it :confused:

Be something like the players name then lock false then the blackhawks name

thx in advance.

and no doubt Ill have a few more questions and i do hope to get better at editing ArmA

cheers stevo

Share this post


Link to post
Share on other sites

Any one all i need is a simple vehicle lock/unlock code that i can assign to one player

Share this post


Link to post
Share on other sites

Maybe it's not as simple as you think!

I've looked at this three times now and I'm still thinking about how to accomplish what you need.

Be patient...if someone has an easy solution for you ...it will come.

Share this post


Link to post
Share on other sites

I imagine there's a few ways you could do this but here's one way using an unlock action.

Player you want to have the action would be named West1 in the mission, and add this to the chopper's init:

nul = this addAction ["Unlock", "unlock.sqf", "", 2, true, true, "", "_this == West1 && locked _target"];
nul = this addEventHandler ["GetOut", {if (_this select 2 == West1) then {(_this select 0) lock true};}];
this lock true;

then include the annoyingly brief file unlock.sqf:

(_this select 0) lock false;

Cheers

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  

×