Jump to content

Advancing the game clock


tsuki no mori

Recommended Posts

Does anyone know a way' date=' in a script or otherwise, to advance the game clock X number of hours? Sort of like sleeping or waiting but without the perks or the count-down dialog.

[/quote']

 

Not sure if this is what you want, but you can raise the timescale value using the console command set timescale to x and the in-game time will pass more quickly. The default value of x is 20, anything above 20 (like 40, 400, 4000 and so on) will do.

Link to comment

Thanks for the reply I'm aware of timescale and I'm starting to believe that there is no clean way to advance the clock other than to use this. I guess the code would look something like:

 

save current timescale

set timescale to something large

call Utility.WaitGameTime(hours to wait)

restore timescale

 

It might not be as precise as I'd like but it's may be the only option.

Link to comment

Reference the global variable GameHour in the script as a property. It's a float. When you want to advance the clock just use the Mod() function: GameHour.Mod(1.0) adds an hour to the clock' date=' takes care of changing the day if you advance past midnight and does so in a thread safe manner!

[/quote']

 

this is excellent work. there have been times when I needed to get from 2am to 10am and didn't want to or couldn't just 'wait'. excellent solution.

 

Just checking: this is script only, not console, right?

Link to comment

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use