Jump to content

Setting time with scripts: Possible issues


Zorkaz

Recommended Posts

Setting the game hour with a script is obviously something that can screw with AI and should be avoided if possible.

 

But still I'm curious if anybody has encountered a really grave and specific issue with this. Something you couldn't fix by sleeping another day through (ingame).

Link to comment
Share on other sites

Manipulating time is similar to actor values. Setting is dangerous, modifying is OK;

pGameHour.SetValue(16) ; BAD

pGameHour.Mod(fTravelGameHours) ;FINE if positive value

pGameHour.Mod(16 - pGameHour.GetValue()) ; OK if you have less/more value logic to avoid negatives

Because Mod() will automatically trigger updates for all dependent processes like AI movement packages and handle day/month/year rollovers.

 

Many recent hours testing out the impacts of travel time for Vertibird World Travel.

Link to comment
Share on other sites

Since you have lots of experience with setting time and scripting in general

what would you say about setting time in a custom worldspace to always twelve o'clock.

(Via a looping script in a trigger area that checks if the time's more/less than 12)

 

It's just a thought though nothing concrete yet, I haven't even begun time scripts yet nor the mod.

Link to comment
Share on other sites

I do not know what the impact would be on game time indexed or triggered events.

 

Needs a significant investment in instrumented test cases to see what happens: script timers, garbage collection and cell reset type things.

Link to comment
Share on other sites

Yeah the "untestedness" (and unpredictable things that can happen) are my concern. I guess I will workaround.

 

But at least I will be able to make a "self-regnerating" fridge

Link to comment
Share on other sites

  • Recently Browsing   0 members

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