Jump to content

Recommended Posts

 

Quote

 

/* Setup the federal reserve building(s) */
_dome = nearestObject [[16019.5,16952.9,0],"Land_Dome_Big_F"];
_rsb = nearestObject [[16019.5,16952.9,0],"Land_Research_house_V1_F"];

_gateholding = nearestObject [[16019.5,16952.9,0],"Land_BackAlley_01_I_gate_F"];

_gaterelease = nearestObject [[16019.5,16952.9,0],"Land_BackAlley_01_I_gate_F"];

_gatejail = nearestObject [[16019.5,16952.9,0],"Land_BackAlley_01_I_gate_F"];

_hqhold1 = nearestObject [[16019.5,16952.9,0],"Land_BackAlley_01_I_gate_F"];

_hqhold2 = nearestObject [[16019.5,16952.9,0],"Land_BackAlley_01_I_gate_F"];

_hqhold3 = nearestObject [[16019.5,16952.9,0],"Land_BackAlley_01_I_gate_F"];

_hqhold4 = nearestObject [[16019.5,16952.9,0],"Land_BackAlley_01_I_gate_F"];

for "_i" from 1 to 3 do {_dome setVariable[format["bis_disabled_Door_%1",_i],1,true]; _dome animate [format["Door_%1_rot",_i],0];};
_dome setVariable["locked",true,true];
_rsb setVariable["locked",true,true];
_rsb setVariable["bis_disabled_Door_1",1,true];

_gateholding setVariable["bis_disabled_Door_1",1,true];

_gaterelease setVariable["bis_disabled_Door_1",1,true];

_gatejail setVariable["bis_disabled_Door_1",1,true];

_hqhold1 setVariable["bis_disabled_Door_1",1,true];

_hqhold2 setVariable["bis_disabled_Door_1",1,true];

_hqhold3 setVariable["bis_disabled_Door_1",1,true];

_hqhold4 setVariable["bis_disabled_Door_1",1,true];
_hqhold3 allowDamage false;
_hqhold4 allowDamage false;

 

Hello,

Does this extract from the Federal Reserve code look correct if i wanted to lock various Fence Gates and only allow them to be opened through an addAction using a virtual item life_keycard? Or is there a more efficient way of doing such a thing?

I have also tried a combination of, if (!isDedicated && {playerSide == civilian}) then {this setVariable ["bis_disabled_Door_1", 1, false];} with this addAction but to no avail.

 

Thank you for any help

Share this post


Link to post
Share on other sites
On 8/11/2019 at 7:06 AM, ✪₁₃₃₇ | Google Translate? said:

I have also tried a combination of, if (!isDedicated && {playerSide == civilian}) then {this setVariable ["bis_disabled_Door_1", 1, false];} with this addAction but to no avail.

 

Disable the door in the init for the object, then use the action to enable it if they have the key-card.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...