TwiggyShip Posted September 7, 2014 Share Posted September 7, 2014 (edited) Hi, I'm currently hard at work on my Rochester Overhaul mod, and have run into a bit of a problem. I currently have three portcullis set up around the various entrances into my castle's grounds, and have hooked them all up to MetalLever01 active parents that all work fine, which is cool. However recently I have seen several mods that feature doors/portcullis that will open automatically when approached. This would be a great thing for me to include as I currently am having difficulty with several NPCs that need to walk from the town into the castle bailey but can't use the levers. So if I could make them open automatically somehow, it would solve a lot of issues. I was thinking maybe a trigger box might work for this? But I'm not sure how to set that up, or what trigger would be needed. Any help would be greatly appreciated. Thanks, Joe. Edited September 7, 2014 by TwiggyShip Link to comment Share on other sites More sharing options...
Mattiewagg Posted September 7, 2014 Share Posted September 7, 2014 Well you put a trigger in front of (and on the other side) of the portcullis. Then you attach a very similar script to the triggerbox that's on your levers. For example, if you had this script on your lever: ObjectReference Property Portcullis Auto Event OnActivate(Actor akActionRef) If Portcullis.GetOpenState() == 1 || Portcullis.GetOpenState() == 2 ;portcullis is open or opening Portcullis.SetOpen(false) Else ;portcullis is closing or closed (or cannot be opened or closed) Portcullis.SetOpen() EndIf EndEvent Then your trigger would have this script instead: ObjectReference Property Portcullis Auto Event OnTriggerEnter(ObjectReference akActionRef) If Portcullis.GetOpenState() == 1 || Portcullis.GetOpenState() == 2 ;portcullis is open or opening Portcullis.SetOpen(false) Else ;portcullis is closing or closed (or cannot be opened or closed) Portcullis.SetOpen() EndIf EndEvent Link to comment Share on other sites More sharing options...
TwiggyShip Posted September 7, 2014 Author Share Posted September 7, 2014 Okay, that makes sense. But I've never really messed with triggers before. I'm trying to drop a trigger box in my cell, and it shows in Cell View, but not in the render window :/ I'm probably trying to do something here that is beyond my current understanding of the CK, but if you wouldn't mind helping me through it that would be great of you :) Link to comment Share on other sites More sharing options...
Mattiewagg Posted September 7, 2014 Share Posted September 7, 2014 Okay, that makes sense. But I've never really messed with triggers before. I'm trying to drop a trigger box in my cell, and it shows in Cell View, but not in the render window :/ I'm probably trying to do something here that is beyond my current understanding of the CK, but if you wouldn't mind helping me through it that would be great of you :smile:Try pressing M. Triggers count as markers, so if you have markers toggled off it might not work.Also, make sure your trigger is big enough to be seen. And make it a really atrocious, blaring color (think lime green) so you can see it. Link to comment Share on other sites More sharing options...
TwiggyShip Posted September 7, 2014 Author Share Posted September 7, 2014 Markers are on, but for some reason it still won't exist visually. I've tried going into WarehouseAmbushes and copying a defaultSelfActivateTRIG and that seemed to work when linked to the door via Activate Parent. Need to fiddle with it a bit though I think. Link to comment Share on other sites More sharing options...
TwiggyShip Posted September 7, 2014 Author Share Posted September 7, 2014 Ok so the defaultSelfActivateTRIG only works once, after that it won't activate again. I'll try your script suggestion, but quick question; do I need to alter it in anyway to match the portcullis' reference or FormID or anything like that? Or can I literally copy and paste? Link to comment Share on other sites More sharing options...
Mattiewagg Posted September 7, 2014 Share Posted September 7, 2014 Ok so the defaultSelfActivateTRIG only works once, after that it won't activate again. I'll try your script suggestion, but quick question; do I need to alter it in anyway to match the portcullis' reference or FormID or anything like that? Or can I literally copy and paste?Just make sure to fill the portcullis property. Link to comment Share on other sites More sharing options...
Recommended Posts