vonBennett Posted February 2, 2019 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.
Thuggysmurf Posted February 4, 2019 Posted February 4, 2019 Does this work? Scriptname xxxxxxx extends ObjectReference ConstEvent OnActivate(ObjectReference akActionRef) utility.Wait(5.0) Self.SetOpen(false)EndEvent
vonBennett Posted February 5, 2019 Author 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
Community Manager Pickysaurus Posted February 5, 2019 Community Manager 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:
vonBennett Posted February 6, 2019 Author 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
vonBennett Posted February 13, 2019 Author 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.
WondererSoLo Posted April 2, 2020 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!
Zorkaz Posted April 2, 2020 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
WondererSoLo Posted April 2, 2020 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
Zorkaz Posted April 2, 2020 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
Recommended Posts