harleythemadgod Posted March 9, 2020 Posted March 9, 2020 I need a pretty basic script but as yet I haven't been able to fully understand the timer function well enough to employ it. It's on a cheat-y version of an automatic sliding door, only without the sliding, because i'm n00b. It disables on activation and enables a previously disabled version of itself that is positioned as "open". I just need to it automatically "close" again after a while. Basically: ; ----------------------------------------------------------------- Begin Auto_Door_Scribt If ( MenuMode == 1 )ReturnEndif If ( OnActivate == 1 )"Door_Closed"->Disable"Door_Open"->EnableEndif If ( 10 seconds pass after activation) ; (this is the bit i dont know how to do lol)"Door_Closed"->Enable"Door_Open"->DisableEndif End Auto_Door_Scribt ; ----------------------------------------------------------------- Alternatively, if there was a way to activate it and have it move in realtime along a single axis, then return to it's original position 10 seconds later to await activation again, that would be better. The important part there is awaiting manual activation; otherwise I could just use a modified float script from vanilla with a move command instead of a rotate. So it'd look something like this, i think: ; ----------------------------------------------------------------- Begin Auto_Door_Scribt If ( MenuMode == 1 )ReturnEndif If ( OnActivate == 1 )"Door_Sliding"->Move, Y, 10Endif If ( 10 seconds pass after activation) ; (this is the bit i dont know how to do lol)"Door_Sliding"->Move, Y, -10Endif End Auto_Door_Scribt ; ----------------------------------------------------------------- And if that's still not complicated enough, thenTHIS IS TO GO EVEN FURTHER BEYOND ... A variation of it that isn't activated manually, but a legitimate automatic opener script that's triggered by distance. I've got a headache just thinking about it lol.But yeah if one of you legends could at least put a proper timer function on that first one that would be awesome! >picture unrelated
harleythemadgod Posted March 9, 2020 Author Posted March 9, 2020 Here's my attempt. I honestly don't really understand what I'm doing here, and it probably shows. I'll test it later. Feel free to make any corrections. ; ----------------------------------------------------------------- Begin Auto_Door_Scribt Float TimerShort myUNQvariable If ( MenuMode == 1 )ReturnEndif If ( GetDistance < 128 )Set Timer to 0Set myUNQvariable to 1Endif If (myUNQvariable == 1 )"Door_Sliding"->Move, Y, 10Endif If ( timer == 10 )"Door_Sliding"->Move, Y, -10Set Timer to 0Set myUNQvariable to 0Endif End Auto_Door_Scribt
harleythemadgod Posted March 10, 2020 Author Posted March 10, 2020 Thanks guys, huge help. Can someone direct me to a modding help forum where people are actually active?
abot Posted March 10, 2020 Posted March 10, 2020 Thanks guys, huge help. Can someone direct me to a modding help forum where people are actually active?We are mostly on morrowind discord
Recommended Posts