kingtitan Posted October 15, 2011 Share Posted October 15, 2011 I am no scripter, unfortunately and I making a mod where I could really use a "Auto Lock" script for a door controlled by a lever. Basically whenever I close the door via the lever, I want it to lock back to its previous state. Right now, without a script, the door opens and closes via the lever, but it doesn't lock back when i activate the lever to close the door. My only option right now is to console lock it every time i shut it. Any help would be GREATLY appreciated. Link to comment Share on other sites More sharing options...
The_Vyper Posted October 16, 2011 Share Posted October 16, 2011 I am no scripter, unfortunately and I making a mod where I could really use a "Auto Lock" script for a door controlled by a lever. Basically whenever I close the door via the lever, I want it to lock back to its previous state. Right now, without a script, the door opens and closes via the lever, but it doesn't lock back when i activate the lever to close the door. My only option right now is to console lock it every time i shut it. Any help would be GREATLY appreciated.Try something like this: scn DoorAutoLockScript Short Open Begin OnActivate If open != 1 DoorRef.Unlock DoorRef.Activate Set Open to 1 Elseif Open == 1 DooRef.Activate DoorRef.Lock LockLevel set open to 0 Endif End Link to comment Share on other sites More sharing options...
kingtitan Posted October 18, 2011 Author Share Posted October 18, 2011 Worked like a charm, thanks vyper! Kudos Link to comment Share on other sites More sharing options...
The_Vyper Posted October 18, 2011 Share Posted October 18, 2011 Worked like a charm, thanks vyper! KudosYou're welcome! :D Glad I could help. Link to comment Share on other sites More sharing options...
Recommended Posts