MathLeBeau Posted November 26, 2015 Share Posted November 26, 2015 I am searching for a script that close a door after 3 sec. Any help? Link to comment Share on other sites More sharing options...
sLoPpYdOtBiGhOlE Posted November 26, 2015 Share Posted November 26, 2015 Attach this to your door.This works when the door is activated, it's default is 5 seconds and it'll close the door, but you can set the delay property to what you like.Also has a distance property so the door doesn't close while an actor is standing in it, default is 70 units, this also can be set to what you like (for bigger doorways where you need a further distance to be clear of the door). Scriptname myDoorScript extends ObjectReference Float Property fDelay = 5.0 Auto {Optionally set Delay before the door closes, default 5.0 secs} Float Property fDistance = 70.0 Auto {Optionally set distance of actors before the door closes so the door doesn't close while an actor in standing in it, default 70.0 units} Event OnActivate(ObjectReference akActionRef) RegisterForSingleUpdate(fDelay) EndEvent Event OnUpdate() If GetOpenState() < 3 If !Game.FindClosestActor(Self.X, Self.Y, Self.Z, fDistance) SetOpen(False) Else RegisterForSingleUpdate(fDelay) EndIf EndIf EndEvent Link to comment Share on other sites More sharing options...
Recommended Posts