MadTod Posted December 16, 2013 Share Posted December 16, 2013 I know it's possible to unlock doors with terminals but I want to open a door with a terminal and also close one. So that if I were to use the terminal I could select 'Open Door' if it was closed which would then open it and if it was open, select 'Close Door'but when the 'Open Door' option shows the 'Closed Door' option doesn't and visa versa. I'm not sure if this is possible but I hope it is. Any help would be much appreciated, thanks. Link to comment Share on other sites More sharing options...
Gribbleshnibit8 Posted December 17, 2013 Share Posted December 17, 2013 For the open and close options, you would want to put in a condition for GetOpenState on the options in the terminal to know which one would be shown. Use SetOpenState to open/close the door. Link to comment Share on other sites More sharing options...
MadTod Posted December 18, 2013 Author Share Posted December 18, 2013 So I now know how to make only one option appear at a time but how do I make the terminal open the door. Link to comment Share on other sites More sharing options...
SpartanISW108 Posted December 20, 2013 Share Posted December 20, 2013 Make a global value for your door aaaMyDoorOpenGlobal, the make the conditions on the terminal as above mentioned On the Open door option add a condition with the global value created, set it to getopenstate then select == and set the value for zero. In the result script for the open door option you want it to open the door and then set the global you created to 1. Then for the close door option in the conditions, add your global again and set it up exactly the same but after the == put the value to 1, and in the result script for the close door option after the close door command (can't remember off the top of my head) make the script set the global value you created to 0 Sorry for the poorly written instructions, I'm posting this off my mobile Link to comment Share on other sites More sharing options...
MadTod Posted December 20, 2013 Author Share Posted December 20, 2013 Just a few questions: 1) When creating a Global, what do I set the value to.2) How do I make it associated with my door.3) In the conditions do I use Global value and if so, how do I then set the value to something else.4) Do I create new conditions or edit the ones Gribbleshnibit8 mentioned.5) Do I need to create a script. Sorry for the inconvenience. Link to comment Share on other sites More sharing options...
Jojash Posted December 20, 2013 Share Posted December 20, 2013 (edited) Just a few questions: 1) When creating a Global, what do I set the value to.2) How do I make it associated with my door.3) In the conditions do I use Global value and if so, how do I then set the value to something else.4) Do I create new conditions or edit the ones Gribbleshnibit8 mentioned.5) Do I need to create a script. Sorry for the inconvenience. 1 & 3) You don't need a global for this, you can set the door as a linked reference to the terminal. If you're unsure of how to do that, it is explained here. (This is a tutorial for creating a vault, it's a little specific about things, so bear that in mind.) 2) Again, this is linking, so just take a look at the tutorial linked above. 4 & 5) You'll need to use the conditions that Gribbleshnibit8 mentioned in the Item Result Script box of your terminal. Allow me to go into some more detail. After linking your terminal to the door you want to open and close, go to the Item Result Script box for that button (The entry in the Menu Items box). In the box there, you'll need the lines ref rDoor set rDoor to getLinkedRef if rDoor.GetOpenState 3 rDoor.SetOpenState 1 elseif rDoor.GetOpenState 1 rDoor.SetOpenState 0 endifThis way, when you use the terminal and the door is closed, it will open and vice versa. If you want the button to change (as in, if the door is closed, the button will read "Open Door", but if it's closed it will read "Close Door" or whatever) however, we'll need to do things a little differently. I'll put the guide for that in a spoiler tag, so that if you're happy with just having one button, it doesn't get in the way. :smile: 1) Make another button. This will be for when the door is open. 2) Go to your first button. Look for the Item Conditions box. It should be at the bottom of the page. Right-click inside it and select "New". From there select, "GetOpenState". After this, go to where it says "Run on" and select "Linked Ref". You will also need to make sure that in the "value" box, there is a "3". Now hit "OK". 3) Look for the Force Redraw box. It should be just above the Item Result Script box. Make sure that it is ticked. 4) Go to the Item Result Script box, and add the lines: ref rDoor set rDoor to getLinkedRef rDoor.SetOpenState 15) Now, go to the second button and repeat steps 2 and 3, but makes sure that the number in the "value" box is a 1, instead of a 3. 6) In the Item Result Script box, add the lines: ref rDoor set rDoor to getLinkedRef rDoor.SetOpenState 0 Edited December 20, 2013 by Jojash Link to comment Share on other sites More sharing options...
MadTod Posted December 20, 2013 Author Share Posted December 20, 2013 The open function doesn't seem to work, the close function does and I followed the instructions correctly, does the second script go before or after the first, here's how it looks now: ref rDoorset rDoor to getLinkedRefif rDoor.GetOpenState 3 rDoor.SetOpenState 1elseif rDoor.GetOpenState 1 rDoor.SetOpenState 0endif ref rDoorset rDoor to getLinkedRedrDoor.SetOpenState 1 Link to comment Share on other sites More sharing options...
Jojash Posted December 20, 2013 Share Posted December 20, 2013 You don't need to use both, it's one or the other. Are you using two buttons or just the one? If the former then you need to use the two scripts I provided in the guide included in the spoiler tag, if the latter, you need to use the first script I provided you with. Link to comment Share on other sites More sharing options...
MadTod Posted December 20, 2013 Author Share Posted December 20, 2013 (edited) Works now, thanks. I don't suppose you know how I could use a trigger to open and close the door also, I want it to appear as though it opens/closes automatically from the other side? Edited December 20, 2013 by TanisDuncan Link to comment Share on other sites More sharing options...
kellyhusky Posted February 18, 2014 Share Posted February 18, 2014 Sorry for the resurrection, But I was wondering if anyone has figured out how to unlock multiple doors at once from one Terminal option, Link to comment Share on other sites More sharing options...
Recommended Posts