vonBennett Posted February 2, 2019 Share Posted February 2, 2019 i am try to get the doors to my hangman's Alley Settlement to automatically close (like the doors in Covenant do). I added the 'DoorClosureScript' but hat seems not to work? I am using the double metal utility doors attached to the Covenant wall doorway. Is that the proper script to use? If so do i need to set up the script a certain way? Thank you. Link to comment Share on other sites More sharing options...
Thuggysmurf Posted February 4, 2019 Share Posted February 4, 2019 Does this work? Scriptname xxxxxxx extends ObjectReference ConstEvent OnActivate(ObjectReference akActionRef) utility.Wait(5.0) Self.SetOpen(false)EndEvent Link to comment Share on other sites More sharing options...
vonBennett Posted February 5, 2019 Author Share Posted February 5, 2019 So...I am a newbie at this and I want to thank you for your help. Okay here is what I did. In the Creation Kit, I double clicked on the door and scrolled over and in 'scripts' I added a new one. In the 'add new script' I did the following (minus the quotes): Name: " vonBennett_door". Extends: "ObjectReference" with the 'const' box checked.Documentation String: "Event OnActivate(ObjectReference akActionRef) utility.Wait(5.0) Self.SetOpen(false) EndEvent" Then I clicked "OK", saved and exited the Creation Kit. I loaded up the game but the door does not close after opening. Did I miss a step? Thank you Thuggysmurf Link to comment Share on other sites More sharing options...
Pickysaurus Posted February 5, 2019 Share Posted February 5, 2019 So...I am a newbie at this and I want to thank you for your help. Okay here is what I did. In the Creation Kit, I double clicked on the door and scrolled over and in 'scripts' I added a new one. In the 'add new script' I did the following (minus the quotes): Name: " vonBennett_door". Extends: "ObjectReference" with the 'const' box checked.Documentation String: "Event OnActivate(ObjectReference akActionRef) utility.Wait(5.0) Self.SetOpen(false) EndEvent" Then I clicked "OK", saved and exited the Creation Kit. I loaded up the game but the door does not close after opening. Did I miss a step? Thank you Thuggysmurf What you did there is add the actual script as a comment in the source file. You need to now see "vonBennett_door" attached to your object, right click and edit the source, then copy in the code and choose compile from the menu. Hopeful this will help :smile: Link to comment Share on other sites More sharing options...
vonBennett Posted February 6, 2019 Author Share Posted February 6, 2019 (edited) I clicked on the door, right clicked on vonBennett_Door, clicked 'edit source code' (the code was in there), clicked on 'compile', upon completion it stated that is was successful, I saved and then edited out of the 'edit source', then saved and exited the C.K. The script in the source code: Scriptname vonBennett_door extends ObjectReference Const Event OnActivate(ObjectReference akActionRef) utility.Wait(5.0) Self.SetOpen(false) EndEvent Loaded the game but doors still not closing automatically after opening. I must be still not doing something right? I will continue to work on this. Thank you both for your help. Edited February 6, 2019 by vonBennett Link to comment Share on other sites More sharing options...
vonBennett Posted February 13, 2019 Author Share Posted February 13, 2019 I clicked on the door, right clicked on vonBennett_Door, clicked 'edit source code' (the code was in there), clicked on 'compile', upon completion it stated that is was successful, I saved and then edited out of the 'edit source', then saved and exited the C.K. The script in the source code: Scriptname vonBennett_door extends ObjectReference Const Event OnActivate(ObjectReference akActionRef) utility.Wait(5.0) Self.SetOpen(false) EndEvent Loaded the game but doors still not closing automatically after opening. I must be still not doing something right? I will continue to work on this. Thank you both for your help.**Update*** I got the automatic closing door script from Thuggysmurf to work.; I was making a mistake creating the new script. Thanks again Thuggysmurf and Pickysaurus. Link to comment Share on other sites More sharing options...
WondererSoLo Posted April 2, 2020 Share Posted April 2, 2020 "**Update*** I got the automatic closing door script from Thuggysmurf to work.; I was making a mistake creating the new script. Thanks again Thuggysmurf and Pickysaurus." I'm trying to make this work using an ID Card Reader and the RRSecretDoorBrick01. Specifically, I wanted the door to close after 5 seconds, but I can't get the script to work.Can you explain what mistake you were making?Thanks! Link to comment Share on other sites More sharing options...
Zorkaz Posted April 2, 2020 Share Posted April 2, 2020 Here this should work. Put this on the door Event onload()while self.isenabled()utility.wait(5)self.setopen(false)endwhileEndevent Link to comment Share on other sites More sharing options...
WondererSoLo Posted April 2, 2020 Share Posted April 2, 2020 (edited) Nice! I'll try that.Thank you! Edit: It didn't work for me, but I could have implemented it incorrectly.Do I have to add a property to the script?For further clarification, I use a keycard to swipe the ID card reader which opens the SecretDoor. So far, the keycard works on the card reader and the door opens, but I cannot get it to close. Edited April 2, 2020 by WondererSoLo Link to comment Share on other sites More sharing options...
Zorkaz Posted April 2, 2020 Share Posted April 2, 2020 This might be because it's not a typical door and has different animation states You might find out what states it has in the preview window of the object Link to comment Share on other sites More sharing options...
Recommended Posts