Jump to content

Schedule an event to recur periodically by game time


pufthemajicdragon

Recommended Posts

I'm working on a store mod and I need it to run an event periodically ad infinitum. I prefer if the event is driven by game time rather than by real time, i.e. to run every 3 game hours (quasi-randomly between 8am and 6pm).

RegisterForUpdate is based on real time, and it has a few bugs. If I can't find an alternative, I'll probably use it (or a loop of RegisterForSingleUpdate). But I'm not totally familiar with the CK, so if there's another script function that runs on game time, or if there's a way to do this with the Radiant quest system without using a script, I'd like to explore that first.

 

Right now I'm working on some other functionality, but I'm posting this now so I can hopefully have some answers by the time I get to this part. I'm planning to try linking the script for my event to an AI package, don't know if that's even possible yet, and I've never had luck with getting packages to work anyway.

 

Any suggestions?

Link to comment
Share on other sites

There is RegsiterForSingleUpdateGameTime. It would do the job that you want. Issue with it (as I discovered) is that it doesn't start working until the player has gotten their hands freed when following the original game start. You'll have to figure out a workaround. Easiest is to simply tell users to not activate the mod until their hands are free.

Link to comment
Share on other sites

There is RegsiterForSingleUpdateGameTime. It would do the job that you want. Issue with it (as I discovered) is that it doesn't start working until the player has gotten their hands freed when following the original game start. You'll have to figure out a workaround. Easiest is to simply tell users to not activate the mod until their hands are free.

Ha! That was too easy! Don't know how I missed it on the CK wiki... Thanks a million :smile:

I'm making a mod to turn Breezehome into a player-owned shop for selling all your extra loot. The issue you mentioned won't be a problem for me - this won't even kick off until the player buys Breezehome.

Thanks again!

Edited by pufthemajicdragon
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...