generated from Jaysyn/ModuleTemplate
Initial Commit
Initial Commit
This commit is contained in:
44
_module/nss/g_lightsout.nss
Normal file
44
_module/nss/g_lightsout.nss
Normal file
@@ -0,0 +1,44 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Lights Out
|
||||
//:: g_lightsout.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
|
||||
Will turn all the Tilelights in the current area to black. Save the light
|
||||
settings so they can be turned back on later.
|
||||
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Jay Clark
|
||||
//:: Created On: August 31, 2004
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
void main()
|
||||
{
|
||||
object oArea = GetArea(OBJECT_SELF);
|
||||
int x,y;
|
||||
vector vLoc;
|
||||
location lLoc;
|
||||
string sLight;
|
||||
for(x=0;x<32;x++)
|
||||
{
|
||||
for(y=0;y<32;y++)
|
||||
{
|
||||
vLoc = Vector(IntToFloat(x),IntToFloat(y),0.0);
|
||||
lLoc = Location(oArea,vLoc,0.0);
|
||||
//Save Color first for all lights
|
||||
sLight = "LIGHT" + IntToString(x) + "." + IntToString(y) + ".1";
|
||||
SetLocalInt(oArea,sLight,GetTileMainLight1Color(lLoc));
|
||||
sLight = "LIGHT" + IntToString(x) + "." + IntToString(y) + ".2";
|
||||
SetLocalInt(oArea,sLight,GetTileMainLight2Color(lLoc));
|
||||
sLight = "LIGHT" + IntToString(x) + "." + IntToString(y) + ".3";
|
||||
SetLocalInt(oArea,sLight,GetTileSourceLight1Color(lLoc));
|
||||
sLight = "LIGHT" + IntToString(x) + "." + IntToString(y) + ".4";
|
||||
SetLocalInt(oArea,sLight,GetTileSourceLight2Color(lLoc));
|
||||
SetTileMainLightColor(lLoc,TILE_MAIN_LIGHT_COLOR_BLACK,TILE_MAIN_LIGHT_COLOR_BLACK);
|
||||
SetTileSourceLightColor(lLoc,TILE_MAIN_LIGHT_COLOR_BLACK,TILE_MAIN_LIGHT_COLOR_BLACK);
|
||||
}
|
||||
}
|
||||
RecomputeStaticLighting(oArea);
|
||||
}
|
||||
Reference in New Issue
Block a user