Script: Detect if clear skycloudy?

Post » Thu Jun 21, 2012 3:42 pm

Hello,

Could someone please let me know how to detect if the sky is cloudy, clear or raining?

So far the only thing I have found is:

http://www.creationkit.com/GetClassification_-_Weather

weather cWeather = Weather.GetCurrentWeather()
int wClass = cWeather.GetClassification()

Problem is that it only ever seems to return a "0" even when there is thick cloud in the sky.

Thanks
User avatar
Aliish Sheldonn
 
Posts: 3487
Joined: Fri Feb 16, 2007 3:19 am

Post » Thu Jun 21, 2012 7:19 am

I think http://www.creationkit.com/GetCurrentWeather_-_Weather is what you need, then just run it against the area's cloudy/raining/clear weather types to see if it's a match.
User avatar
Scared humanity
 
Posts: 3470
Joined: Tue Oct 16, 2007 3:41 am

Post » Thu Jun 21, 2012 8:29 pm

So you mean put the cloudy weather types in a form list and check to see if it is in that? Problem is that makes it rather brittle if other mods add new weathers.

Unfortunately I can't seem to get the name of the weather item, just its form ID. SKSE I think has a function to check for characters/words in a string so I could have used that to see if it has "cloud" in it.
User avatar
~Amy~
 
Posts: 3478
Joined: Sat Aug 12, 2006 5:38 am


Return to V - Skyrim