Neverwinter Vault

Expand AllContract All -Site -My Profile -Features

Neverwinter Nights 2

-NWN2 Files -NWN2 Game Info -NWN2 Resources -NWN2 Community

Neverwinter Nights

-NWN Files -NWN Game Info -NWN Resources -NWN Community

Vault Network
RPG Vault
VN Boards
IGN Vault
Vault Wiki
· Age of Conan
· Anarchy Online
· Asheron's Call
· Dark Age of Camelot
· City of Heroes
· D&D
· EVE Online
· EverQuest
· EverQuest 2
· Final Fantasy
· Guild Wars
· Lineage 2
· Lord of the Rings Online
· Middle Earth
· Neverwinter Nights
· Pirates of the Burning Sea
· Rise of the Argonauts
· Star Wars Galaxies
· Tabula Rasa
· The Matrix Online
· The Witcher
· Titan Quest
· Two Worlds
· Vanguard
· Warhammer
· World of Warcraft

Planet Network
Planet Hub

IGN
Games
Cheats
Entertainment

The Web   The Site  



NWN SCRIPTS

- Jump to comments -
Title  Lighting of Area: how to change main and source color for every tile at once
Author  elchwang
Submitted / Updated  01-03-2003 / 11-22-2006
Category  Area
Expansions  Works on all versions
View Code  

Select All Text | View Code in separate window
Format  Code Only
Type  Type - Other
Includes  None
Description
Two short custom functions. The first changes the main lighting to be uniform in every tile within a given area. The second does the same for source lighting. Five input variables need to be defined in the function, as follows: (1&2) int iRows and int iColumns are the number of tile rows and columns, respectively, in the intended target area. (3&4) int iColor1 and iColor2 are the intended primary and secondary light colors. See below for a listing of the TILE_MAIN_LIGHT_COLOR and TILE_SOURCE_LIGHT_COLOR constants and their int values. (5) object oArea is the intended target area, default set to be whatever called the script (i.e., can be left unspecified if called by a handle within the intended area's Area Properties). Send all comments to elchwang on the official NWN url or post on this site. (Created by elchwang, v1.00, 3JAN03)

Files

NameTypeSizeDownloads
NO FILES
SCORE OUT OF 10
10
3 votes
View Stats
Cast Your Vote!

PORTFOLIO
Add this entry to your portfolio so you can track it
Manage your existing portfolios or create a new one.
SCREENS
No Images




You Must Be Logged In to Participate.
Comments (11):

Posted by LeurnidHand at 2012-05-23 11:26:13    
Per BubaDragon's tutorial in the Lexicon, you CAN turn off the tile source light. Using 'Black' does not work, use the int value 255, and it turns off the light.
_________________________
All good people are asleep and dreaming...

I feel much better now.

Posted by Melendhar at 2011-10-25 05:30:03    Voted 10.00 on 10/25/11
brilliant. Thats just what i needed. But it totally sucks that the "source-lightning" part doesnt work... Bioware should have fixed that a long time ago...

Posted by Borden Ha'elven at 2007-07-04 06:04:08    Voted 10.00 on 07/04/07
This is just what I needed. It will save me hours of experimental coding. Thanks a millon.
_________________________

Stuff I've done.

Posted by Nydoc ( 168.156.xxx.xxx ) at 2004-06-03 13:50:00    
This is useful if you want to change the lights dynamically within the game. If you are merely trying to override the randomized lights created by Aurora, you can use the the tile selector and drag a blue box over the entire map, right click, then change all the lights simultaneously. Just a clairifier.

Posted by Old_Scores_Transfered at 2004-02-20 10:29:18    Voted 10.00 on 02/20/04
This is a compilation of the old system into a single score. There were 9 that made this score of 9.56 then rounded to 10.

Posted by Archangel ( ..xxx.xxx ) at 2003-05-10 03:51:00    
Thanks for your help. I really appreciated it.

Posted by elchwang ( ..xxx.xxx ) at 2003-05-08 09:52:00    
Archangel,

Yes, the behavior you describe is a "feature" of Bioware, and as far as I know there's nothing you can do to get around it. I've seen a couple of discussion threads on it on the official Bioware forums, but nothing definitive came up there. The best that you can do is work around the problem by changing torch color instead of turning them off.

Posted by Archangel ( ..xxx.xxx ) at 2003-05-05 15:16:00    
I tried to use this script activating it by a lever,
to switch the torches elements on tiles on/off ( Good Castle Tileset ).
However, it's only possible to turn the torches on..after that it's possible to change the color of the flames by script but not to turn them off ( setting the light source on black ). It's not a problem of this script though....
I think is some kind of bug....do anyone know a solution?

Posted by elchwang ( ..xxx.xxx ) at 2003-01-05 00:56:00    
Jon The Mage,

You only need to specify the parameters "once", when you
call the function. You define the function first, as I've
done. Then, in any script where you want to use that
function, just paste it at the top above the void main()
line, and, wherever you want to use it, just type a line
such as:

//object oArea = ***defined oArea here***;
SetAreaMainLightColor(5, 7, 0, 0, oArea);

where oArea is define earlier as your area.
This will set all the tiles within the area to be black in
color, for an area that has 5 tiles of rows, 7 of columns.

Hope that makes sense.

Cheers.

Posted by Rache Bartmoss ( ..xxx.xxx ) at 2003-01-04 13:41:00    
It's a function. Call it with the correct parameters. If
you do not know what a function is or does, please read up
on some basics. No offense.

Posted by Jon The Mage ( ..xxx.xxx ) at 2003-01-04 13:09:00    
When you specify the X and Y, is that the num you set it
to when ur making the area, or the num the mouse pointer
give u when u point to the top right hand corner. And, do
u need to specify that num for all of these lines:
for (iXAxis = 0; iXAxis < iRows; iXAxis++)
for (iYAxis = 0; iYAxis < iColumns; iYAxis++)
vector vTile = Vector(fXAxis, fYAxis, 0.0);
location lTile = Location(oArea, vTile, 0.0);

or just the first 2?

You must be Logged In to post comments in this section.

 
Most recent posts on the MMO General Boards
Analyst: Star Wars: The Old Republic Could...Analyst: Star Wars: The Old Republic Could Sell 3M: more numbers
- last reply by Acao on Aug 15, 2011 06:15 PM
which class will your first character be
- last reply by Blisteringballs on Aug 15, 2011 05:50 PM
New Community Content!
- posted by Vault_News on Aug 15, 2011 05:00 PM
New Community Content!
- posted by Vault_News on Aug 15, 2011 04:00 PM
NWN Idea Database Update
- posted by Vault_News on Aug 15, 2011 03:46 PM
Missing Votes for NWN2 Hall of Fame
- posted by Vault_News on Aug 15, 2011 03:40 PM
Missing Votes for NWN Hall of Fame
- posted by Vault_News on Aug 15, 2011 03:39 PM
Random Questions and game altering suggest...Random Questions and game altering suggestions!!!
- last reply by ArkadyTepes on Aug 15, 2011 03:22 PM
State of the game?
- last reply by LyricOpera on Aug 15, 2011 01:37 PM
Yesterday streaming, now demanding downloa...Yesterday streaming, now demanding download :(
- last reply by Sinane-tk on Aug 15, 2011 10:23 AM
 

   


IGN Entertainment
By continuing past this page, and by your continued use of this site, you agree to be bound by and abide by the User Agreement.
Copyright 1996-2011, IGN Entertainment, Inc. | Support | Privacy Policy | User Agreement | RSS Feeds
IGN’s enterprise databases running Oracle, SQL and MySQL are professionally monitored and managed by Pythian Remote DBA.


NWN2 Hall of Fame

HOF NWN2 Modules


View all Hall of Fame entries


Neverwinter Nights 2

TOP NWN2 Modules

NEW Modules

NEW Reviews

NEW INTL. Modules

TOP Hakpaks

TOP Gameworlds

TOP Tutorials

TOP Prefab:Areas

TOP Blueprints

TOP Plugins

TOP UI

TOP Other

TOP Visual Effects

TOP Scripts

TOP Tools

TOP Movies

TOP Models

TOP Characters





Hall of Fame

HOF NWN Modules


View all Hall of Fame entries


TOP NWN Modules

NEW NWN Modules

NEW Reviews

TOP Intl. Modules

TOP NWN Hakpaks

TOP NWN Gameworlds

TOP NWN Models

TOP NWN Portraits

TOP NWN Scripts

TOP NWN Prefabs

TOP NWN Other

TOP NWN Movies

TOP Sounds

TOP NWN Textures

TOP NWN Creatures

TOP NWN Characters