Maverick11 Posted April 21, 2015 Share Posted April 21, 2015 Anyone recall any such event that happens in game? Trying to find a script that close door behind you and reopen upon boss kill. Any help would be most appreciated. Link to comment Share on other sites More sharing options...
skinnytecboy Posted April 21, 2015 Share Posted April 21, 2015 (edited) To close the door you're best using a trigger with a script attached (Event OnTriggerEnter)with an object reference property that points to your door. You can set the door to closed by the statement "MyDoor.SetOpen(false)" inside the event of the script. To lock it, also add MyDoor.Lock() To open it again after the boss death you could attach another script to the boss with an OnDeath event with the statement mydoor.SetOpen(true)...MyDoor.lock (false) P.s. ck does have a simple door close script.. just search for "door" in the script search window. Hopefully that will give you an understanding of how it works. Alternatively you could use quest stages too Edited April 21, 2015 by skinnytecboy Link to comment Share on other sites More sharing options...
DDProductions83 Posted April 21, 2015 Share Posted April 21, 2015 Skinnytecboy has come so far, I remember when he was just a wee lass. (IE he is correct) Link to comment Share on other sites More sharing options...
Maverick11 Posted April 21, 2015 Author Share Posted April 21, 2015 I probably should have been a little more specific. I need an animated door to close behind. Like gates for example. If I attach the script to a gate and go through the trigger, will the door close behind me and lock? I'll check it out anyway. Thanks. Link to comment Share on other sites More sharing options...
skinnytecboy Posted April 21, 2015 Share Posted April 21, 2015 On 4/21/2015 at 7:10 AM, Darren83 said: Skinnytecboy has come so far, I remember when he was just a wee lass. (IE he is correct)Ha getting there.. slowly but surely. Link to comment Share on other sites More sharing options...
DDProductions83 Posted April 21, 2015 Share Posted April 21, 2015 Locking is annoying so I create collision boxes that cover the door and enable them when door closed and disable when open ;)Cause I'm a baddy but it works Link to comment Share on other sites More sharing options...
Aragorn58 Posted April 21, 2015 Share Posted April 21, 2015 (edited) On 4/21/2015 at 7:36 AM, Maverick11 said: I probably should have been a little more specific. I need an animated door to close behind. Like gates for example. If I attach the script to a gate and go through the trigger, will the door close behind me and lock? I'll check it out anyway. Thanks.Could put something like this on the triggerbox Reveal hidden contents Scriptname doorclosescript extends ObjectReference {closes and locks a door upon player entering a triggerbox} ObjectReference Property MyDoor Auto Bool Property doOnce = TRUE Auto Event OnTriggerEnter(ObjectReference akActivator) if(game.GetPlayer() == akActivator) MyDoor.SetOpen(false) MyDoor.Lock(true) doOnce == true EndIf EndEvent And this on the actor you want to kill Reveal hidden contents Scriptname doorscript extends Actor ;This Script opens a portcullis on actor death ObjectReference Property MyDoor Auto Event OnDeath(Actor akKiller) If (akKiller == (game.GetPlayer()) MyDoor.SetOpen() endif EndEvent Edited April 21, 2015 by Aragorn58 Link to comment Share on other sites More sharing options...
Maverick11 Posted April 22, 2015 Author Share Posted April 22, 2015 Thank you Aragorn will give this a try now. Link to comment Share on other sites More sharing options...
Recommended Posts