Jump to content

Script to disable chain when a door is unlocked


morrowind1979

Recommended Posts

I have made a door with a chain across it I want to make a script that disables the chain when the door is unlocked. This is as far as I have got:

Scriptname EDChainUnlockScript extends ObjectReference  

ObjectReference Property CHN  Auto  

ObjectReference Property TRPD  Auto

Event OnLockStateChanged()
	If (TRPD.IsLocked())
		CHN.disable()
	EndIf
EndEvent

The problem is I cannot find the opposite version of Islocked. I have tried IsUnlocked, Islocked(false), Islocked(0), IsNotLocked but nothing is recognized as a function or command. There is nothing on teh CK Wiki either only examples for the function Islocked. Does anyone know how to make this work?

Edited by morrowind1979
Link to comment
Share on other sites

  • Recently Browsing   0 members

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