Code: Select all
scn GenericDoorOpenedElsewhereSCRIPT
; Don't pass a '1' parameter in your terminal's activate script
; This script will not allow NPCs to use the door.
; It's intended for sneaky/hacky players to be able to use the door for gameplay purposes
ref linkedRef
;**********************
Begin onLoad
lock 255 ;in case someone forgets to lock the door in the editor
End
;**********************
Begin onActivate
set linkedRef to getLinkedRef
if (IsActionRef player == 1 && GetLocked == 1)
ShowMessage GenericDoorActivatedElsewhereMsg
elseif (IsActionRef LinkedRef == 1 && GetLocked == 1)
unlock
activate
else
activate
endif
End