Jump to content

How do you move in-game time forward in script?


PJMail

Recommended Posts

fTravelDistance = ThisActivator.GetDistance(TravelTarget)
fTravelGameHours = ((fTravelDistance / 1000) / 3600) * pTimescale.GetValue() ; vertibird 1000 units/real second 
pGameHour.Mod(fTravelGameHours) ; automagically kicks GameDaysPassed
Utility.WaitMenuMode(1.0) ;events for unpaused menus 

after the player.MoveTo() call 

Link to comment
Share on other sites

Thank you - as always a font of experience.

I thought gamehour was a (read-only) global value just giving the hour of the  day - so it actually is writeable? That is so non-obvious...

Or is your pGameHour something else?

Ok, you did mean the Global - so what's a safe way of adding 3 hours? A loop adding small amounts (say 1hr), or just go for it and add the total like your example?

I am not expecting much to happen, but I am in the exterior (a VB as you guessed) so events could fire (or I am fired apon!!!)

Link to comment
Share on other sites

I have never passed time without a modal menu pausing wolrd events so no experience of that.

If you increment time hoping for external events to happen you will have a problem detecting them to stop time passing:

> ModGameHour 

> Pause script for how long to allow AI packages and world events to update and stuff to happen ?

> If datum actor is not IsInCombat() IsInScene()  IsInWorkbench() IsBleedingout() GetSleepState() then ModGameHour again & etc

Link to comment
Share on other sites

  • Recently Browsing   0 members

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