Astramune Posted July 22, 2010 Share Posted July 22, 2010 Problem Number One: I am trying to make a terminal... that opens a door. Not unlocks it, but actually triggers it to open. Now I know how to make a -switch- do this same thing... but I would like to make it so that there is an option in the menu. Which means scripting (I think). I have tried... and tried... and tried... to get my head around scripting. To no avail, it seems. I have also tried looking up tutorials for this very thing... but nothing quite seems to cover it. So, here is what I am hoping someone can spell out for me, because my feeble mind cannot grasp it otherwise. I need the option in my terminal's menu for the player to open this door. I need that option to then change into the option to 'close' said door. I'm pretty sure this has something to do with the 'force redraw' toggle... but really, I have no idea how to make -that- work either. And then lastly... I would like to make sure that the option to open the door yet again returns. So, if someone can help me out with this little bit, I will be very appreciative... and I'll come around again the next time I hit a wall. It probably won't be very long, I'm sure. Link to comment Share on other sites More sharing options...
Astramune Posted July 22, 2010 Author Share Posted July 22, 2010 -Edited Away... Problem Solved- Right then, back to problem one! Link to comment Share on other sites More sharing options...
pkleiss Posted July 23, 2010 Share Posted July 23, 2010 Make your door persistent and give it an Editor ID. Make two entries on your terminal, One for opening it , one for closing it. Tick the force redraw for both as you have surmised. Now, you are going to add a condition on each of the terminal entries. For the one that will open the door, right click in the conditions box and select new. Find "GetOpenState". Set the "value" to 3 (that means its closed). Then in the "Run On" drop down box, select "Reference". Then click on the "Select" button and move your red cross-hair over the door. When the cross-hair turns white, double click to make the door the reference to run this condition on. You may have to adjust your render window first so that the door will be in view to do this step. Now, click OK to add this condition to your menu choice. Next, right click on the condition you just added and select "Copy Condition", then paste it into your "Close" terminal entry. Then double click on the pasted condition and change the "Value" to 1 (this means open). Now, in the results script for your "Open" entry, type in the the following: "MyDoorRef.SetOpenState 1" where "MyDoorRef" is replaced with the Editor ID of your door. Do the same with the "Close" entry, but use a value of "0" instead. That's it. If you did it all correctly, your terminal will open and close the door and you will only see one option at a time. There is one caveat though. GetOpenstate will also return a different value for when the door is opening (not opened nor closed) and when it is closing. So you may want to add this line to the end of each results script: ForceTerminalBack That will force the player out of the terminal and give the door time to animate. Then activating the terminal again, will display the proper entry. But it is not really necessary as the door won't animate until the player is out of the terminal anyway as the game pauses while the player is using the terminal. Link to comment Share on other sites More sharing options...
Astramune Posted July 24, 2010 Author Share Posted July 24, 2010 Oh wow! Even a talentless sod like me can understand it, the way that you explained it! Right-o! So, I'm going to get to work on testing this out a bit... hopefully I won't screw something up in the process! I'll be back, later, with more questions and comments and the like. Thanks for the response, so far! I've been told that the Nexus is a rather supportive community... so with any luck... I'll keep getting answers! Link to comment Share on other sites More sharing options...
rowenpowell Posted August 12, 2010 Share Posted August 12, 2010 Ok i know this has nothing to do with astramune's question but i dont want to start a new thread. :P So i need to make a terminal that lists ammo types then gives out x amount of ammo to the player and can still be clicked after 1st use. Link to comment Share on other sites More sharing options...
bben46 Posted August 12, 2010 Share Posted August 12, 2010 If it doesn't have anything to do with his question, then it doesn't belong here and you need to start a new topic. So I'm locking this one for thread hijacking. That gets you a strike.Bben46, Moderator Link to comment Share on other sites More sharing options...
Recommended Posts