MateoElFidel Posted May 13, 2012 Share Posted May 13, 2012 I need a script that is put on a door, 5 seconds after the door is opened, it gets closed automatically... All i know is that i need a float timer, and using Getopenstate/setopenstate and disable commands. i just don't know how to put it all together. Link to comment Share on other sites More sharing options...
b3w4r3 Posted May 15, 2012 Share Posted May 15, 2012 float timer Begin OnActivate set timer to 5 activate End Begin GameMode If timer > 0 set timer to timer - getsecondspassed return elseif getopenstate == 1 setopenstate 0 endif End If the door has a long animation, like the vault doors, the timer number may need to be higher to make sure it stays open for 5 seconds instead of closing as soon as the animation stops. Generally you would time the doors open animation and add 5, then set the timer to that. Untested but should work, providing I didn't make a typo. Link to comment Share on other sites More sharing options...
Recommended Posts