Jump to content

Auto Opening/Closing Slide Doors


Tinislav

Recommended Posts

Yo,

 

I wanted to edit the slide the doors in game like those in the Institute to open/close automatically when someone comes near them, but I dont even understand how to edit them at all.

 

Thats the door I found in the creation kit.

 

I tried checking the "Automatic Door" box but it just resulted in an infinite black loading screen when coming close to it (or at least long enough 'till I lost patience and hit alt+f4).

 

I would already be satisfied if they just closed a couple of seconds after being opened manually.

Also I have no clue how scripting works though, so that might be the issue. But if its not, can anyone help me? Would be much appreciated.

Oh and whilst where at it, can anyone recommend any tutorials that are less about adding stuff (npcs, houses etc) and more about changing the already existing? Dont necessarily need to be videos.

 

Thanks in advance and cheers,

Tinislav

Edited by Tinislav
Link to comment
Share on other sites

Its a bit complicated to do for a newbie, but there's how I would approach it:

1. Create a new FormList, name it myDoorsFormList, and then drop the doors that you want to auto-close in this FormList.

2. Create a new quest, go to the Aliases tab, create a new ref collection alias, and set a condition in Match Conditions:

- IsInList myDoorsFormList == 1

3. In the ref collection alias, add a new script, and use the event OnActivate to close the doors of the list after 2 seconds:

Event OnActivate(ObjectReference akSenderRef, ObjectReference akActionRef)
    ; Check if the door is opening
    If(akSenderRef.GetOpenState() == 2)
        ; Wait 2 sencods
        Utility.Wait(2)
        ; Close the door
        akSenderRef.SetOpen(false)
    EndIf
EndEvent

Save the script, save your plugin and do a test. If it doesn't work let me know, I didn't tried it, but should work.

Link to comment
Share on other sites

Create a new script:

YOsc1H.jpg

 

Paste the code, and save it.

 

PS: You need to put a name to the ref collection, and close the ref collection alias, do the same for the quest before trying to add a new script, I can see the title in your screenshot says: Add script to <unknown> (00000000), that means you didn't named the collection nor the quest. Also you should set Max Initial Fill Count to 0, which means unlimited, otherwise (by default) it will only work for one door:

 

9PrTfh.jpg

Edited by DieFeM
Link to comment
Share on other sites

Create a new script:

YOsc1H.jpg

 

Paste the code, and save it.

 

PS: You need to put a name to the ref collection, and close the ref collection alias, do the same for the quest before trying to add a new script, I can see the title in your screenshot says: Add script to <unknown> (00000000), that means you didn't named the collection nor the quest. Also you should set Max Initial Fill Count to 0, which means unlimited, otherwise (by default) it will only work for one door:

 

9PrTfh.jpg

 

 

I did as you said but when I clicked ok on "add new script" there was some kind of error message that said something about papyrus error.

Now the script doesnt show up anywhere but when I try to create a new one with the same name it says its already existing.

Link to comment
Share on other sites

 

I did as you said but when I clicked ok on "add new script" there was some kind of error message that said something about papyrus error.

Now the script doesnt show up anywhere but when I try to create a new one with the same name it says its already existing.

 

 

Save the plugin, close the CK, remove the script from the game folder under Scripts, and also the source from Scripts\Source\User, then go to the Bethesda launcher, click the CK, in the top-right corner click on "Game Options", then "Scan and Repair".

Then open the CK, say yes to the question that pops up, when the CK finish loading open your plugin, and try again.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...