Jump to content

Door Lock Script


miah13

Recommended Posts

Hello all I was really hoping someone could post a quick script for using an activator to toggle lock a door. I would be greatly appriciative if someone would be kind enough to help me out on this one, thanks for listening.
Link to comment
Share on other sites

Here you go:

 

Scn MyDoorLockScript

Begin OnActivate

If GetActionRef == player
If MyDoorRef.GetLocked == 0
	MyDoorRef.Lock 25
ElseIf MyDoorRef.GetLocked == 1
	MyDoorRef.Unlock
EndIf
EndIf
End

 

Just attach this script to your activator, give your door the right Reference ID and place a checkmark in the box that says "Persistent Reference". You might want to use a different scriptname and RefID to prevent conflicts. You can change the number after "MyDoorRef.Lock" to something different if you want to change the kind of lock. (I think a value of 25 is an easy lock).

 

Hope this helps! ;D

Link to comment
Share on other sites

  • Recently Browsing   0 members

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