Actually after rereading the first post again....I've never had a problem with a "torchlit only" area and not being able to turn off all the source lights (in the toolset anyway). You just grab all tiles while in terrain mode and set sourcelight 1 and 2 to black. Then if you want to have them all turn on while in game you would use the "SetTileSourceLightColor(location, int, int)" function followed by the "RecomputeStaticLighting" function. Turning them back off is the part that you can't seem to do via scripting. At least I still havent found a way.
This script will turn on all the source lights in an area:
//Turn tile light sources on.
void main()
{
object oArea = GetArea(OBJECT_SELF);
float fAreaX = IntToFloat(GetAreaSize(AREA_HEIGHT, oArea));
float fAreaY = IntToFloat(GetAreaSize(AREA_WIDTH, oArea));
vector vTile = Vector(0.0, 0.0, 0.0);
location lTile = Location(oArea, vTile, 0.0);
float fX = 0.0;
float fY = 0.0;
while ((fX < fAreaX) && (fY < fAreaY))
{
vTile = Vector(fX, fY, 0.0);
lTile = Location(oArea, vTile, 0.0);
SetTileSourceLightColor(lTile, TILE_MAIN_LIGHT_COLOR_WHITE, TILE_MAIN_LIGHT_COLOR_WHITE);
fX = fX + 1.0;
if(fX >= fAreaX)
{
fY = fY + 1.0;
fX = 0.0;
}
}
RecomputeStaticLighting(oArea);
}
Modifié par GhostOfGod, 07 septembre 2011 - 02:01 .