NWN2 Toolset

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Weather Control

 
Post new topic   Reply to topic    NWN2 Toolset Forum Index -> NWN2 Script Vault
View previous topic :: View next topic  
Author Message
Hellcow



Joined: 17 Jan 2007
Posts: 100
Location: Denmark

PostPosted: Mon Mar 05, 2007 2:04 pm    Post subject: Weather Control Reply with quote

The script goes on your Area OnEnter, the variables should be explained in the top notes Smile

Code:
//hc_weather
////////////////////////////////////////////////////////
//
// Sets the weather of an area determined by variables
//
// Author: Hellcow
// Last modified: March 05, 2007
////////////////////////////////////////////////////////

// Variable - WEATHER_TYPE - int
//  0 = Rain
//  1 = Snow
//  2 = Lightning
//
// Variable - WEATHER_POWER - int
//  0 = No Power
//  1 = Weak
//  2 = Light
//  3 = Medium
//  4 = Heavy
//  5 = Stormy
//


void main()
{
int nWeatherType = GetLocalInt(OBJECT_SELF, "WEATHER_TYPE");
int nPower = GetLocalInt(OBJECT_SELF, "WEATHER_POWER");

int nWeather;
int nPowerChoice;

    switch ( nWeatherType )
    {
        case 0:     // Rain
            nWeather = WEATHER_TYPE_RAIN;
            break;
        case 1:     // Snow
            nWeather = WEATHER_TYPE_SNOW;
            break;
        case 2:     // Lightning
            nWeather = WEATHER_TYPE_LIGHTNING;
            break;
    }
      
    switch ( nPower )
    {
        case 0:     
            nPowerChoice = WEATHER_POWER_OFF;
            break;
        case 1:     
            nPowerChoice = WEATHER_POWER_WEAK;
            break;
        case 2:     
            nPowerChoice = WEATHER_POWER_LIGHT;
            break;
        case 3:     
            nPowerChoice = WEATHER_POWER_MEDIUM;
            break;
        case 4:     
            nPowerChoice = WEATHER_POWER_HEAVY;
            break;                  
        case 5:     
            nPowerChoice = WEATHER_POWER_STORMY;
            break;
     }   

SetWeather(OBJECT_SELF, nWeather, nPowerChoice);
}
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Darrich



Joined: 02 Aug 2007
Posts: 2

PostPosted: Mon Aug 06, 2007 10:03 am    Post subject: Reply with quote

Nice...
Thou only rains work, no VFX for snow and lightning, but that is a Obsedian bug or leaveout, I guess.
Back to top
View user's profile Send private message
Malice



Joined: 17 Oct 2007
Posts: 9
Location: Luton UK

PostPosted: Thu Oct 18, 2007 4:44 pm    Post subject: Reply with quote

Snow was added in MotB expansion (Couldn't say if it's updated in NWN2 but I imagine it would be)

_________________
------------------
PJ
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    NWN2 Toolset Forum Index -> NWN2 Script Vault All times are GMT
Page 1 of 1

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum





Powered by phpBB © 2001 phpBB Group

Chronicles phpBB2 theme by Jakob Persson (http://www.eddingschronicles.com). Stone textures by Patty Herford.

Abuse - Report Abuse
Powered by forumup.com free forum, create your free forum!
Created by Raulken of Hyarbor S.r.l.
TOS & Privacy.

Page generation time: 0.027