ionoblivion Posted May 22, 2016 Share Posted May 22, 2016 Members13 posts I want to do a mod in Oblivion similar with Silent Hill game . I'm good at 3D modeling and textures , but i don't know how to use an electric panel to lock a door . I need a script , I tried through a quest but i faild . If someone know that, please help me and i will credit you for that. Link to comment Share on other sites More sharing options...
Surilindur Posted May 22, 2016 Share Posted May 22, 2016 (edited) You can use an OnActivate block. Here is an example script (rename it!): ScriptName PanelTest ref rDoor Begin OnActivate PlayerRef set rDoor to GetParentRef If ( rDoor ) If ( rDoor.GetLocked ) rDoor.Unlock Message "The door has been unlocked." Else rDoor.Lock 100 Message "The door has been locked tight." EndIf EndIf EndTo make that work, you need torename the script and add it to your modmake the panel base object an activatorset the script of the activator base object to that oneplace one panel in the game worlddouble-click on the panel ref in the world, and set its Enable Parent to the doorLock command here: http://cs.elderscrolls.com/index.php?title=LockUnlock command here: http://cs.elderscrolls.com/index.php?title=UnlockGetLocked command here: http://cs.elderscrolls.com/index.php?title=GetLocked No need to give any credit, anyone could answer that. It is pretty basic. And that only works for the static doors. If you want a door that swings, then the door model needs to be reset to closed state when locked. Edited May 22, 2016 by Contrathetix Link to comment Share on other sites More sharing options...
Recommended Posts