Skyviper086 Posted March 31, 2015 Share Posted March 31, 2015 Is there is a quick way to make an automatic door and or link a door to a switch. I'm wanting to make a hanger that when my character is about to land the hanger door will open automatically and I would like to have a switch so it can be opened before take off. Link to comment Share on other sites More sharing options...
DopeChuck Posted March 31, 2015 Share Posted March 31, 2015 You could try attaching an activate script to a trigger and using the OnTriggerEnter. Or try attaching a script that opens it when the Player is within a certain distance from the object using the GetDistance function. See example script below. scn YourModExampleSCRIPT Begin if Player.GetDistance YourDoorREF <= ;Distance away to activate door YourDoorREF.Activate endif End Please note that I'm fairly new to scripting using TESScript, so it may or may not work as I have not tested it. Link to comment Share on other sites More sharing options...
Jokerine Posted April 1, 2015 Share Posted April 1, 2015 (edited) Something like Dope's script could work, yup. If you'd like to use a triggerbox instead it could be something like this. scn AutoDoorScript Begin OnTriggerEnter player MyDoorRef.activate END Begin OnTriggerLeave Player MyDoorRef.activate END I think something like that would make it so the door opens when the player enters the trigger, and closes it when the player exits. You can also try with this, if the above doesn't work. This one may be preferable because, in the script above, if the door is open for whatever reason (maybe if an NPC used it), when the player enters the trigger the door would close instead :laugh: So I'd recommend you try the script below first. scn AutoDoorScript Begin OnTriggerEnter player MyDoorREF.SetOpenState 1 END Begin OnTriggerLeave Player MyDoorREF.SetOpenState 0 END Something to keep in mind with Trigger blocks is that you need to make the trigger boxes big enough that the player cannot enter and leave the trigger in too little time because the scripts will get messed up. But you shouldn't worry about that unless your trigger box is like, paper-thin :laugh: Edited April 1, 2015 by Jokerine Link to comment Share on other sites More sharing options...
Deleted19691154User Posted April 1, 2015 Share Posted April 1, 2015 Jokerine << My Hero!!!! Thanks for sharing you have finally helped me figure this out, I have been trying to get my head around this for weeks now XD Link to comment Share on other sites More sharing options...
Jokerine Posted April 1, 2015 Share Posted April 1, 2015 *tips fedora* Link to comment Share on other sites More sharing options...
Recommended Posts