henesua,
I do use RecomputeStaticLighting. What botherded me most about the ZEP lighting was that each lamppost had it's own HB script.
My current build contains a city. Lots of lights. To avoid so many HBs, I use one placeable HB to controll all the lighting in an area.
This is the HB script on a barrel in one area.
void main()
{
object oPC = GetFirstPC();
object oArea = GetObjectByTag("AirimoreDocksNorth");
object oBarrel = OBJECT_SELF;
object oObject = GetFirstObjectInArea();
// if(GetArea(oPC) == oArea)
// {
if(GetIsDawn())
{
while(GetIsObjectValid(oObject))
{
if(GetTag(oObject) == "LampNDockOn")
{
SetLocked(oObject,FALSE);
}
oObject = GetNextObjectInArea();
}
}
else
{
if(GetIsDay())
{
while(GetIsObjectValid(oObject))
{
if(GetTag(oObject) == "LampNDockOn")
{
SetLocked(oObject,FALSE);
}
oObject = GetNextObjectInArea();
}
}
else
{
if(GetIsDusk())
{
while(GetIsObjectValid(oObject))
{
if(GetTag(oObject) == "LampNDockOff")
{
SetLocked(oObject,FALSE);
}
oObject = GetNextObjectInArea();
}
}
else
{
if(GetIsNight())
{
while(GetIsObjectValid(oObject))
{
if(GetTag(oObject) == "LampNDockOff")
{
SetLocked(oObject,FALSE);
}
oObject = GetNextObjectInArea();
}
}
}
}
}
//}
DelayCommand(2.0,RecomputeStaticLighting(oArea));
}
And this is the on unlocked script for a lamp that's on in the area.
void main()
{
object oLamp = OBJECT_SELF;
string sLamp = "lamp_n_dock_off";
int nType = OBJECT_TYPE_PLACEABLE;
location lLoc = GetLocation(oLamp);
CreateObject(nType,sLamp,lLoc,FALSE);
DestroyObject(oLamp,0.01f);
}
I had to uncoment the check for the PC on the first script. for some reason it would only kill the lights in the area of the PC.
I have made 2 areas so far, with about 30 lights, and have not noticed any lag.
Ed.