Initial commit

Initial commit
This commit is contained in:
Jaysyn904
2024-09-13 09:10:39 -04:00
parent 09dc8aec92
commit d1c309ae63
8437 changed files with 8727659 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
////////////////////////////////////////////////////////////////////////////////
//
// Olander's - Turn Lights On Off (From nw_o2_onoff)
// opw_auto_lights
// By:Don Anderson
// dandersonru@msn.com
//
// Place this on the OnUsed Event of a Placeable for Lighting
//
////////////////////////////////////////////////////////////////////////////////
void main()
{
if (GetLocalInt(OBJECT_SELF,"NW_L_AMION") == 0)
{
object oSelf = OBJECT_SELF;
PlayAnimation(ANIMATION_PLACEABLE_ACTIVATE);
DelayCommand(0.4,SetPlaceableIllumination(oSelf, TRUE));
SetLocalInt(OBJECT_SELF,"NW_L_AMION",1);
DelayCommand(0.5,RecomputeStaticLighting(GetArea(oSelf)));
effect eLight = EffectVisualEffect(VFX_DUR_LIGHT_YELLOW_20);
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eLight, oSelf);
}
else
{
object oSelf = OBJECT_SELF;
PlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE);
DelayCommand(0.4,SetPlaceableIllumination(oSelf, FALSE));
SetLocalInt(OBJECT_SELF,"NW_L_AMION",0);
DelayCommand(0.9,RecomputeStaticLighting(GetArea(oSelf)));
effect eEffect = GetFirstEffect(oSelf);
while (GetIsEffectValid(eEffect) == TRUE)
{
if (GetEffectType(eEffect) == EFFECT_TYPE_VISUALEFFECT) RemoveEffect(oSelf, eEffect);
eEffect = GetNextEffect(oSelf);
}
}
}