Turning off a module by using 5-secs delay after turning it on?
-
Use a tick variable for it. On enable, set tick to 0, and on update set tick++. Check if tick == 100 (cuz 1 sec = 20 ticks which means 5 sec = 100 ticks) then toggle it
-
-
@sexma said in Turning off a module by using 5-secs delay after turning it on?:
Use a tick variable for it. On enable, set tick to 0, and on update set tick++. Check if tick == 100 (cuz 1 sec = 20 ticks which means 5 sec = 100 ticks) then toggle it
-
That's the easiest way to do it. You can do it without much javascript knowledge