Jump to content

Script request


Rattlerx5150

Recommended Posts

I need a script,, since im so bad at skyrim scripting

 

I have a room in my mod house that I call my vault,, its got 3 doors protecting it

 

I would like to make a "lock doors" button, that when pressed willl close, and lock all 3 doors

 

can this be dont, , can you post the script here, and I can do the rest

 

 

Thank you all in advance

Link to comment
Share on other sites

Locking them is pretty easy with a script. I'm not sure how closing them would be done. Technically, that is an animation. You might be able to get around this by "Activating" the doors to close them, then locking them. However, if any of the doors were already closed, then doing this would actually open them.

 

Does anyone else reading this post know how to check whether a door is in the "Open" state?

Link to comment
Share on other sites

Put this script on the button you want to use and fill the script properies with the door references.

Scriptname YourScriptName extends ObjectReference  

ObjectReference Property Door01  Auto
ObjectReference Property Door02  Auto
ObjectReference Property Door03  Auto

Event OnActivate(ObjectReference akActionRef)
    if Door01.GetOpenState() <= 2
                Door01.Setopen(false)
		Door02.Setopen(false)
		Door03.Setopen(false)
                Door01.SetLockLevel(100)
		Door02.SetLockLevel(100)
		Door03.SetLockLevel(100)
		Door01.Lock()
		Door02.Lock()
		Door03.Lock()
    else
		Door01.SetLockLevel(100)
		Door02.SetLockLevel(100)
		Door03.SetLockLevel(100)
		Door01.Lock()
		Door02.Lock()
		Door03.Lock()
    endif
EndEvent
Edited by Ghaunadaur
Link to comment
Share on other sites

  • Recently Browsing   0 members

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