TyburnKetch Posted May 30, 2022 Share Posted May 30, 2022 My brain has gone foggy and I could do with some advice. I have multiple functions on one script, that handle multiple options for the player, all needing to registerforsingleupdategametime. Then onupdategametime i have split those options off to other functions based on a globalvariable (or two). All of the registers have different timescales. Of course, when i call registerforsingleupdategametime the engine ignores any previous calls and just updates the last one. This is obviously a problem. Is there a structure i can use, states or somesuch, within a single script, to have the registers not be discounted? Or when i need to register would i be better off instead pointing the script to a function on another script (or my fear, multiple other scripts) that handle the registers/updates then final functions? Any suggestions gratefully recieved on how best to tackle this. Link to comment Share on other sites More sharing options...
dylbill Posted May 30, 2022 Share Posted May 30, 2022 I think your best bet is to use multiple other scripts unfortunately. Note that they must be attached to different forms. If they are attached to the same form RegisterForSingleUpdate will affect all of the scripts attached to that form. You can use like dummy misc items or something. Link to comment Share on other sites More sharing options...
dylbill Posted May 31, 2022 Share Posted May 31, 2022 Hey, actually that got me thinking it would be great if there were fallout 4 style timers in Skyrim, so I made a mod to do it. You can find it here: https://www.nexusmods.com/skyrimspecialedition/mods/68886/ It uses a combination of SKSE's mod events and placed object references to achieve that functionality. Link to comment Share on other sites More sharing options...
TyburnKetch Posted May 31, 2022 Author Share Posted May 31, 2022 (edited) This is superb! The last thing I expected was a whole mod / script system to be created! Ha. This should prove useful to many. Excellent work! Thank you. I look forward to trying it out. Edited May 31, 2022 by TyburnKetch Link to comment Share on other sites More sharing options...
dylbill Posted May 31, 2022 Share Posted May 31, 2022 Thanks! Happy Modding :) Link to comment Share on other sites More sharing options...
Recommended Posts