ifhopesdie Posted February 9, 2014 Share Posted February 9, 2014 hello im looking for a script for CK thats will automatically shut down my exterior home gate 5 ,10,15,sec(what ever) after i use it some can help me to find it plz thanks alots Link to comment Share on other sites More sharing options...
Chiknbones Posted February 9, 2014 Share Posted February 9, 2014 the sjel blad castle mod uses one on the front gate I believe, you might check it out Link to comment Share on other sites More sharing options...
ifhopesdie Posted February 10, 2014 Author Share Posted February 10, 2014 (edited) have tried something like this but with the mod ''lakeview extented'' the probleme its when i try to load up the script to see what he look like i receice a warning ''error Cannot open store for class ''LakeviewGate'' missing file!'' then i click yes to all then error pop and say ''error accontered wile attempting to reload the script'' so i cant see it Edited February 10, 2014 by ifhopesdie Link to comment Share on other sites More sharing options...
jet4571 Posted February 10, 2014 Share Posted February 10, 2014 That error means the source is not in the source folder the CK uses. Either it wasnt included or it is packed in a .bsa file. Link to comment Share on other sites More sharing options...
bluegenre Posted February 10, 2014 Share Posted February 10, 2014 you could try unpacking any bsa files that came with that mod, or a lot of authors are willing to share their scripts if you ask nicely :] Link to comment Share on other sites More sharing options...
djjohnjarvis Posted February 10, 2014 Share Posted February 10, 2014 (edited) This script should work. You will want to add a property for your door and set the value for RegisterForSingleUpdate in seconds but it's fairly straight forward. Event OnOpen(ObjectReference akActionRef) int openState = YourDoor.GetOpenState() If openState != 3 && openState != 4 RegisterForSingleUpdate(10.0) endIf endEvent Event OnUpdate() YourDoor.SetOpen(false) EndEvent Edited February 10, 2014 by djjohnjarvis Link to comment Share on other sites More sharing options...
ifhopesdie Posted February 10, 2014 Author Share Posted February 10, 2014 (edited) thanks but im having a probleme i probably miss something somewhere 1st new script i add your line (do i need to change something in this? like the ''yourdoor'') i change it to the name of my gate to try but same error during adding the property i receive this error no viable alternative at input 'RegisterForSingleUpdate' im a bit new with the CK so sry and btw witch property i need Edited February 10, 2014 by ifhopesdie Link to comment Share on other sites More sharing options...
djjohnjarvis Posted February 10, 2014 Share Posted February 10, 2014 Ok this is how the full script should look. I have got rid of any need for any properties and I am now just using Self to run the functions directly on the object the script is attached to. So make sure this script is added to the specific object reference you want it triggered on by loading up the cell in the render window and double clicking on the door/gate you want to add it to. Go into the scripts tab for this object reference (you will need to use the arrows to the right of the tabs and scroll along to get to it) and add the script there. Obviously change the script to your liking though. Scriptname DoorAutoCloseScript extends ObjectReference Event OnOpen(ObjectReference akActionRef) int openState = Self.GetOpenState() If openState != 3 && openState != 4 RegisterForSingleUpdate(10.0) endIf endEvent Event OnUpdate() Self.SetOpen(false) EndEvent 1 Link to comment Share on other sites More sharing options...
ifhopesdie Posted February 10, 2014 Author Share Posted February 10, 2014 (edited) thanks a lot for your help i really apreciate its work perfectly i whach many tutorial to try to find something for my probleme but nothing at least all these tutorial will help me for other thing ty again by any chance you know how i can make my gate to be allways lock i made a key for it but the probleme is after i use the key on my gate 1 time she dont need the key anymore i want to the gate need a key everytime :blush: Edited February 10, 2014 by ifhopesdie Link to comment Share on other sites More sharing options...
djjohnjarvis Posted February 10, 2014 Share Posted February 10, 2014 Yea just add this to the current script that you added to your gate. Event OnClose(ObjectReference akActionRef) Self.Lock() endEvent Link to comment Share on other sites More sharing options...
Recommended Posts