Jump to content

Activating a stored variable


Robinsage

Recommended Posts

Hey folks,

 

I'm looking to identify a currently active weather and force it back later. Identifying the weather is easy but I'm having trouble referencing it to force active.

 

I can use 'Weather WeatherNow = Weather.GetCurrentWeather()' to get the weather but I can't get it to work later in the script, like using 'WeatherNow.ForceActive(true)' is no good.

 

Am I going about this the wrong way or missing something?

 

Any help would be greatly appreciated! =)

Link to comment
Share on other sites

I'm assuming this is building on your previous weather script? Why was ReleaseOverride() (or whatever the specific call is) not sufficient?

 

I suspect the new ForceActive() call isn't working because you're not releasing the original override first, or because your local variable is falling out of scope (a topic the CK wiki doesn't even seem to mention at all), but we'd need to see the full context of your script to know for sure.

Link to comment
Share on other sites

Hey Kromey. Yes it is for the same script. I'm looking for an alternative to use besides the release override.

 

Using it works but there is still a transition and I'm getting inconsistent results. Like it will be raining naturally (not forced), and upon releasing any overrides it doesn't always go back to that original rain but clears up to pleasant weather instead. It's as if using release override is resetting the weather instead of restoring it. I'll send you the whole script if you want to take a peek at it, I think you know what I am trying to get done here.

 

I know using force.active is also a temporary measure, so forcing the previous rainy weather back in would transition back to default weather after a short wait allowing for a smoother transition from other weather.

Link to comment
Share on other sites

If you force the current weather when the player leaves the trigger, your weather will never change because you have an override in effect.

 

The reason the weather changes to something else when you release the override is because (I imagine, anyway) weather "patterns" continue to run behind the scenes, they're just "hidden" until you release the override. No way around that, not without, in effect, creating your own entirely new weather engine.

Link to comment
Share on other sites

I'm agreeing with the weather pattern. In new code I'm testing it changes to pleasant weather when it was rainy before. I see no reason for that on a release override.

 

So far the only override in effect is the no precip version of the previous rainy weather. Then the release override on exit. I know forcing weather only lasts for a short time. That may be a factor.

 

At any rate does anyone have a sample script that would catch the current weather and restore it upon shelter exit?

I'm using this with limited success:

 

"Weather Property CurrentWeather Auto" ;assigned to SkyrimDefaultWeather (this may not work as I suspect it wont actually restore the previous weather form, just the sky variables).

 

Then

"CurrentWeather.forceactive(true)" ; is used on exit.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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