NyxDagoneart Posted July 28, 2016 Share Posted July 28, 2016 Hello again! So as it says in the title, I have a treasury vault in my mod, and I would like it so that after the player, unlocks and opens the door the door will close and lock itself after a short period of time. And I still looking at scripts like they are written in some form of elvish would really appreciate help in this! Thank you for your help! Link to comment Share on other sites More sharing options...
Aragorn58 Posted July 28, 2016 Share Posted July 28, 2016 Hello again! So as it says in the title, I have a treasury vault in my mod, and I would like it so that after the player, unlocks and opens the door the door will close and lock itself after a short period of time. And I still looking at scripts like they are written in some form of elvish would really appreciate help in this! Thank you for your help! There are a couple different ways you can do this.First do you just want the door to close and lock so no one else can enter, or do you want to trap the player inside the room? And is the door opened with a key or a lever the first time the player enters? Link to comment Share on other sites More sharing options...
skinnytecboy Posted July 28, 2016 Share Posted July 28, 2016 Place the script on the door (object reference in cell view) Event OnActivate() Utility.Wait(10) ;or whatever time you wantSelf.SetOpen(false); close door Utility.Wait(1) ;little bit of breathing space.Self.Unlock(false); lock doorEndEvent You can use checks on door if need be using GetOpenState() that's up to you. Additionally you can also place a script on a trigger box around the door. Either way. .aside from the event (OnActivate or on trigger enter etc) the native functions (setopenstate etc) are the meat of the script. EVENT = When this happens I want my script to do something. FUNCTION = This is the something that I want my script to do. Google is your friend :) Link to comment Share on other sites More sharing options...
Recommended Posts