Jump to content

Close+Lock Door (req key) On switch activation


RedNinja029

Recommended Posts

After looking at a couple of videos and reading several threads and having a jab at doing it myself a dozen times I can;t get what I need to happen, happen.

 

I have a door called "DoorBunker" which IS set as a persistent reference.

I have a switch Called "BunkerDoorSwitch"

 

I have created a script called "LockDoorSwitch"

 

I want the Door to close and locked (requiring key) on activation of the switch.

I have a key card setup so that's done with. But there's something wrong with the script

 

As mentioned door is set as a persistent reference. The switch itself is linked to it.

 

=================================

scn LockDoorSwitch
begin onactivate player
ref myLink
set myLink to getLinkedRef
myLink.lock
end
===================================
^ i know that is just locking the door i copied the script from a terminal thought using a linked ref would apply the same effect but it does not work at all.
then i discovered this script>>>>>>>
scn DoorCloseLockAvgOnActivate
;
;This script will cause a door to close and lock on activation from a reference other than the player
;
;==================================
begin onActivate
if isActionRef player == 0
lock 2
setOpenState 0
else
activate
endif
end
this did not work either.
Where am I failing here...
Also the last script maybe erroneous in the fact i wish to use a key for it anyhow instead an average lock. I'm guessing lock 0 is a key like the console commands. As you can see I've done some research before posting here I hope someone can guide me here in a solution for a simple door close+lock activated switch which i want to be able to use multiple time not just once.
Thanks for reading
Link to comment
Share on other sites

Incase I caused confusion, the would be unlockable as per normal activation with a keycard. the switch wouldnt require the keycard but just initiate a lockdown of that specific door upon activation by the player itself.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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