Jump to content

NPC's and locked doors


amelmastema

Recommended Posts

Hi!

 

I am making the Underworld player suite. I made a quest that works fine and all which includes a key objective to the door for this place. The door in question is in the Underworld cell where all the NPC's are (Underworld Concourse).

 

The NPC's open the locked door if I do not hurry and unlock it myself. Kind of ruins the quest if you can just wait until a NPC opens it at random, which they do within a minute or two.

 

They find the new room irresistible! I have as I said a designed key and there is only one and no NPC has it. I have tried "Ignored by Sandbox", "Require key" and on top of it set "Very Hard" difficulty on it. Still they get through.

 

 

I don't mind them opening it, just want the player to be the first to do it :)

 

Thanks in advance for any thoughts!

Link to comment
Share on other sites

Well there are 2 solutions here that I know.

 

1. if you got any IdleMarkers and or position's ( leaning on wall or something similar ) and/or chair's and that. set the ownership to PlayerREF, so they wont use the furniture ( what will stop them going in there usally ).

 

2. this script :

 

ScriptName RCDoorScript

Short PCOpened
Float Timer

Begin OnLoad			; if the player left the door open the last time he was in here, close it.
If GetOpenState == 1
	SetOpenState 0				; if you dont want this , just delete this part.
	If GetLockLevel > 0
		Lock
	EndIf
EndIf
End

Begin OnActivate		; If the player is opening the door, don't set the timer.
If IsActionRef Player == 0
	Set Timer to 5	; If an NPC opened the door, close it again after this many seconds
Else
	Set PCOpened to 1
EndIf
Activate						   ; You could try deleting this line here , so the door wont open if the NPC wants to open it.
End

Begin GameMode
If PCOpened == 0
	If Timer > 0
		Set Timer to Timer - GetSecondsPassed
	ElseIf GetOpenState == 1
		SetOpenState 0
		Set Timer to 0
		If GetLockLevel > 0
			Lock					 ; Lock the door again.
		EndIf
	EndIf
EndIf

If GetOpenState == 3
	Set PCOpened to 0
	Set Timer to 0
EndIf
End

 

credits go to bethesda.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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