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)
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.
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:
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.