Begin CT_Closedoor_scriptShort ContVarfloat timer ;original script by Enmesharra ;if the door should happen to get messed up or if the player leaves the cell while a door is not finished ;closing itself this resets everything whenever the player enters the cellIf ( cellchanged > 0 ) SetAtStart Set ContVar to 0endifIf ( ContVar == 0 ) If ( OnActivate ) Activate set ContVar to 1 set timer to 0 EndifElseif ( ContVar == 1 ) If ( OnActivate ) ;if the player closes the door by hand set timer to 6 Endif set timer to timer + GetSecondsPassed If timer > 5 Activate set ContVar to 0 EndifEndifEnd
I'm not sure if the Setatstart command applies only to the door or to everything in the cell - if everything in the cell I'll need to comment out that section
The door shut nicely behind me btw but I suspect something is causing me a slowdown in the cell