Difference between revisions of "SetWeather"

From NWN Lexicon
Jump to: navigation, search
(7nebnr14)
(badomcr4)
Line 40: Line 40:
 
wh0cd398768 <a href=http://buytadalafil.work/>online tadalafil</a>
 
wh0cd398768 <a href=http://buytadalafil.work/>online tadalafil</a>
  
====Version====
+
wh0cd166839 <a href=http://lasixwaterpill.us.org/>buy lasix water pill</a> <a href=http://motrin247.us.com/>motrin 400</a>
 
 
1.61
 
  
 
====Example====
 
====Example====

Revision as of 18:59, 30 August 2017



SetWeather(object, int)

Allows you to set the weather for an area or the entire module.

void SetWeather(
    object oTarget,
    int nWeather
);

Parameters

oTarget

If this is GetModule(), all outdoor areas will be modified by the weather constant. If it is an area, oTarget will play the weather only if it is an outdoor area.

nWeather

WEATHER_*


Description

Set the weather for oTarget.
- WEATHER_USE_AREA_SETTINGS will set the area back to whatever weather the area had set in the toolset.
- WEATHER_CLEAR, WEATHER_RAIN, WEATHER_SNOW will make the weather go to the appropriate precipitation *without stopping*.



Remarks

As of patch 1.31, BioWare has provided us with a GetWeather function, making it a lot easier to manipulate weather. Module builders not using patch 1.31 (or newer) will have to keep track of weather in areas manually.


wh0cd398768 <a href=http://buytadalafil.work/>online tadalafil</a>

wh0cd166839 <a href=http://lasixwaterpill.us.org/>buy lasix water pill</a> <a href=http://motrin247.us.com/>motrin 400</a>

Example

// script to make it snow (module wide) 
void main()
{
    object oModule = GetModule();
    SetWeather(oModule, WEATHER_SNOW);
}

See Also

functions: 

SetCalendar

constants: 

WEATHER_* Constants



 author: Chaz Mead, editor: Jasperre, additional contributor(s): Sean Fuller, Lilac Soul, Jonathan Williams