Jump to content

Simple fast construction set help


lynxcali

Recommended Posts

Okay so I have a prison, and it uses a special key, but if I unlock it once, it becomes unlocked forever so the prisoners can easily just leave. How can I make it so that it becomes locked every time I close it? Does this require a script? Edited by lynxcali
Link to comment
Share on other sites

Okay so I have a prison, and it uses a special key, but if I unlock it once, it becomes unlocked forever so the prisoners can easily just leave. How can I make it so that it becomes locked every time I close it? Does this require a script?

If you set ownership of the door to PlayerFaction, you will be able to open it without a key even while it's locked. No one else will be able to open the door unless: 1.) They have the key. 2.) They're part of the PlayerFaction or whatever faction you set the door ownership to.

Link to comment
Share on other sites

And if you want 'peace of mind' and a touch of realism, you could create a locking spell with a script effect like so:

 

scn LockDoorSpell

ref door

Begin ScriptEffectStart
	Set door To GetSelf
	If door.isActor == 0   	
     	If door.getLockLevel < 99
          	door.Lock 100
     	Endif
	Endif
End 

Begin ScriptEffectFinish
    Message "The door is locked"
End

Link to comment
Share on other sites

Okay so I have a prison, and it uses a special key, but if I unlock it once, it becomes unlocked forever so the prisoners can easily just leave. How can I make it so that it becomes locked every time I close it? Does this require a script?

If you set ownership of the door to PlayerFaction, you will be able to open it without a key even while it's locked. No one else will be able to open the door unless: 1.) They have the key. 2.) They're part of the PlayerFaction or whatever faction you set the door ownership to.

 

Strange because the NPC's were opening it...

Link to comment
Share on other sites

And if you want 'peace of mind' and a touch of realism, you could create a locking spell with a script effect like so:

 

scn LockDoorSpell

ref door

Begin ScriptEffectStart
	Set door To GetSelf
	If door.isActor == 0   	
     	If door.getLockLevel < 99
          	door.Lock 100
     	Endif
	Endif
End 

Begin ScriptEffectFinish
    Message "The door is locked"
End

 

So do I just attach this script to the door or is this a spell I have to cast on the door every time I want to lock it?

EDIT: Okay wow im dumb, I didnt even see that you said spell :P Do you have a script I can attach to the door instead? This is for a mod and I dont want to make it a hassle to lock the door every time you know?

Edited by lynxcali
Link to comment
Share on other sites

Okay so I have a prison, and it uses a special key, but if I unlock it once, it becomes unlocked forever so the prisoners can easily just leave. How can I make it so that it becomes locked every time I close it? Does this require a script?

If you set ownership of the door to PlayerFaction, you will be able to open it without a key even while it's locked. No one else will be able to open the door unless: 1.) They have the key. 2.) They're part of the PlayerFaction or whatever faction you set the door ownership to.

 

Strange because the NPC's were opening it...

If you have the key in your inventory, the door will be unlocked when you go through it and then anyone can open it. If you don't have the key, then only you and those belonging to the owning faction will be able to go through it.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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