Jump to content

Trying to read weather property in a script results in none


BurnTheBooks

Recommended Posts

Hi, I have some problems with weather scripting. I am trying to compare current weather to a weather I created to apply special effects.

 

I am able to compare it by form id, but that is not relative, so not good for me.

 

I need to achieve one of the two:

 

get the name of the weather from this

Weather currentWeather = Weather.GetCurrentWeather()

 

or, get the property in my script to work

Weather Property someWeather Auto

 

I attached property of weather to my quest script, and it reads as none and I am smashing my head into it for two days now, and google results on my searches don't help much. In creation kit everything seems to be fine, weather is attached, but I can't seem to have it available in my script.

 

Any advice is much appreciated.

Link to comment
Share on other sites

If you are using SKSE and you want to get the name of an object, use GetName()

 

So in your case:

Weather currentWeather = Weather.GetCurrentWeather()
Debug.Notification("The current weather is "+currentWeather.GetName()+" ["+currentWeather+"]")

What this would do is print a string in the upper left corner:

  Quote

 

The current weather is <name of weather> [<form id>]

<name of weather> would be replace with the name on the weather form IF it has a name field.

<form id> would be replaced with well the current form id dependent upon load order.

 

 

Now if you are certain that you assigned the correct weather record to your property, then perhaps it might be a good idea to post the rest of your script. Perhaps someone might see something that is preventing it from doing what you want.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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