Index: trunk/src/lib/graphics/effects/cloud_effect.cc
===================================================================
--- trunk/src/lib/graphics/effects/cloud_effect.cc	(revision 9110)
+++ trunk/src/lib/graphics/effects/cloud_effect.cc	(revision 9112)
@@ -39,7 +39,4 @@
 bool      CloudEffect::fadeCloud;
 float     CloudEffect::fadeTime;
-bool      CloudEffect::flashSkyActivate;
-float     CloudEffect::localTimer;
-float     CloudEffect::flashTime;
 
 using namespace std;
@@ -53,5 +50,7 @@
 CREATE_SCRIPTABLE_CLASS(CloudEffect, CL_CLOUD_EFFECT,
                         addMethod("skyColor", ExecutorLua4<CloudEffect,float,float,float,float>(&CloudEffect::shellSkyColor))
-                      ->addMethod("cloudColor", ExecutorLua4<CloudEffect,float,float,float,float>(&CloudEffect::shellCloudColor))
+                        ->addMethod("cloudColor", ExecutorLua4<CloudEffect,float,float,float,float>(&CloudEffect::shellCloudColor))
+                        ->addMethod("activate", ExecutorLua0<CloudEffect>(&CloudEffect::activate))
+                        ->addMethod("deactivate", ExecutorLua0<CloudEffect>(&CloudEffect::deactivate))
                        );
 
@@ -94,7 +93,4 @@
     fadeCloud = false;
 
-    flashSkyActivate = false;
-    localTimer = 0;
-    flashTime = 0;
 
     skyColor = Vector(0.0f, 0.0f, 0.8f);
@@ -192,83 +188,70 @@
     if (this->cloudActivate) {
 
-        localTimer += dt;
-
         this->offsetZ += 0.05 * dt * this->animationSpeed;
 
         this->shader->activateShader();
-        this->offset->set(0.0f, 0.0f, offsetZ);
-
-        if (flashSkyActivate) {
-
-            this->skycolor->set(1, 1, 1);
-            PRINTF(0)("SkyColor set to white\n");
-
-            if (localTimer > flashTime) {
-                flashSkyActivate = false;
-                this->skycolor->set(this->skyColor.x, this->skyColor.y, this->skyColor.z);
-                PRINTF(0)("SkyColor reset\n");
+        this->offset->set
+        (0.0f, 0.0f, offsetZ);
+
+        if(cloudColor != newCloudColor) {
+
+            if(fadeCloud) {
+
+                this->cloudColorFadeX = new tAnimation<CloudEffect>(this, &CloudEffect::setColorCloudX);
+                this->cloudColorFadeX->setInfinity(ANIM_INF_CONSTANT);
+                this->cloudColorFadeY = new tAnimation<CloudEffect>(this, &CloudEffect::setColorCloudY);
+                this->cloudColorFadeY->setInfinity(ANIM_INF_CONSTANT);
+                this->cloudColorFadeZ = new tAnimation<CloudEffect>(this, &CloudEffect::setColorCloudZ);
+                this->cloudColorFadeZ->setInfinity(ANIM_INF_CONSTANT);
+
+                this->cloudColorFadeX->addKeyFrame(cloudColor.x, fadeTime, ANIM_LINEAR);
+                this->cloudColorFadeX->addKeyFrame(newCloudColor.x, 0, ANIM_LINEAR);
+
+                this->cloudColorFadeY->addKeyFrame(cloudColor.y, fadeTime, ANIM_LINEAR);
+                this->cloudColorFadeY->addKeyFrame(newCloudColor.y, 0, ANIM_LINEAR);
+
+                this->cloudColorFadeZ->addKeyFrame(cloudColor.z, fadeTime, ANIM_LINEAR);
+                this->cloudColorFadeZ->addKeyFrame(newCloudColor.z, 0, ANIM_LINEAR);
+
+                fadeCloud = false;
+
+                this->cloudColorFadeX->replay();
+                this->cloudColorFadeY->replay();
+                this->cloudColorFadeZ->replay();
             }
 
-        } else {
-
-            if(cloudColor != newCloudColor) {
-
-                if(fadeCloud) {
-
-                    this->cloudColorFadeX = new tAnimation<CloudEffect>(this, &CloudEffect::setColorCloudX);
-                    this->cloudColorFadeX->setInfinity(ANIM_INF_CONSTANT);
-                    this->cloudColorFadeY = new tAnimation<CloudEffect>(this, &CloudEffect::setColorCloudY);
-                    this->cloudColorFadeY->setInfinity(ANIM_INF_CONSTANT);
-                    this->cloudColorFadeZ = new tAnimation<CloudEffect>(this, &CloudEffect::setColorCloudZ);
-                    this->cloudColorFadeZ->setInfinity(ANIM_INF_CONSTANT);
-
-                    this->cloudColorFadeX->addKeyFrame(cloudColor.x, fadeTime, ANIM_LINEAR);
-                    this->cloudColorFadeX->addKeyFrame(newCloudColor.x, 0, ANIM_LINEAR);
-
-                    this->cloudColorFadeY->addKeyFrame(cloudColor.y, fadeTime, ANIM_LINEAR);
-                    this->cloudColorFadeY->addKeyFrame(newCloudColor.y, 0, ANIM_LINEAR);
-
-                    this->cloudColorFadeZ->addKeyFrame(cloudColor.z, fadeTime, ANIM_LINEAR);
-                    this->cloudColorFadeZ->addKeyFrame(newCloudColor.z, 0, ANIM_LINEAR);
-
-                    fadeCloud = false;
-
-                    this->cloudColorFadeX->replay();
-                    this->cloudColorFadeY->replay();
-                    this->cloudColorFadeZ->replay();
-                }
-
-                this->cloudcolor->set(this->cloudColor.x, this->cloudColor.y, this->cloudColor.z);
+            this->cloudcolor->set
+            (this->cloudColor.x, this->cloudColor.y, this->cloudColor.z);
+        }
+
+        if(skyColor != newSkyColor) {
+
+            if(fadeSky) {
+
+                this->skyColorFadeX = new tAnimation<CloudEffect>(this, &CloudEffect::setColorSkyX);
+                this->skyColorFadeX->setInfinity(ANIM_INF_CONSTANT);
+                this->skyColorFadeY = new tAnimation<CloudEffect>(this, &CloudEffect::setColorSkyY);
+                this->skyColorFadeY->setInfinity(ANIM_INF_CONSTANT);
+                this->skyColorFadeZ = new tAnimation<CloudEffect>(this, &CloudEffect::setColorSkyZ);
+                this->skyColorFadeZ->setInfinity(ANIM_INF_CONSTANT);
+
+                this->skyColorFadeX->addKeyFrame(skyColor.x, fadeTime, ANIM_LINEAR);
+                this->skyColorFadeX->addKeyFrame(newSkyColor.x, 0, ANIM_LINEAR);
+
+                this->skyColorFadeY->addKeyFrame(skyColor.y, fadeTime, ANIM_LINEAR);
+                this->skyColorFadeY->addKeyFrame(newSkyColor.y, 0, ANIM_LINEAR);
+
+                this->skyColorFadeZ->addKeyFrame(skyColor.z, fadeTime, ANIM_LINEAR);
+                this->skyColorFadeZ->addKeyFrame(newSkyColor.z, 0, ANIM_LINEAR);
+
+                fadeSky = false;
+
+                this->skyColorFadeX->replay();
+                this->skyColorFadeY->replay();
+                this->skyColorFadeZ->replay();
             }
 
-            if(skyColor != newSkyColor) {
-
-                if(fadeSky) {
-
-                    this->skyColorFadeX = new tAnimation<CloudEffect>(this, &CloudEffect::setColorSkyX);
-                    this->skyColorFadeX->setInfinity(ANIM_INF_CONSTANT);
-                    this->skyColorFadeY = new tAnimation<CloudEffect>(this, &CloudEffect::setColorSkyY);
-                    this->skyColorFadeY->setInfinity(ANIM_INF_CONSTANT);
-                    this->skyColorFadeZ = new tAnimation<CloudEffect>(this, &CloudEffect::setColorSkyZ);
-                    this->skyColorFadeZ->setInfinity(ANIM_INF_CONSTANT);
-
-                    this->skyColorFadeX->addKeyFrame(skyColor.x, fadeTime, ANIM_LINEAR);
-                    this->skyColorFadeX->addKeyFrame(newSkyColor.x, 0, ANIM_LINEAR);
-
-                    this->skyColorFadeY->addKeyFrame(skyColor.y, fadeTime, ANIM_LINEAR);
-                    this->skyColorFadeY->addKeyFrame(newSkyColor.y, 0, ANIM_LINEAR);
-
-                    this->skyColorFadeZ->addKeyFrame(skyColor.z, fadeTime, ANIM_LINEAR);
-                    this->skyColorFadeZ->addKeyFrame(newSkyColor.z, 0, ANIM_LINEAR);
-
-                    fadeSky = false;
-
-                    this->skyColorFadeX->replay();
-                    this->skyColorFadeY->replay();
-                    this->skyColorFadeZ->replay();
-                }
-
-                this->skycolor->set(this->skyColor.x, this->skyColor.y, this->skyColor.z);
-            }
+            this->skycolor->set
+            (this->skyColor.x, this->skyColor.y, this->skyColor.z);
         }
 
@@ -316,12 +299,4 @@
 void CloudEffect::shellCloudColor(float colorX, float colorY, float colorZ, float time) {
     changeCloudColor( Vector(colorX, colorY, colorZ), time);
-}
-
-void CloudEffect::flashSky( float time ) {
-
-  flashSkyActivate = true;
-  localTimer = 0;
-  flashTime = time;
-
 }
 
Index: trunk/src/lib/graphics/effects/cloud_effect.h
===================================================================
--- trunk/src/lib/graphics/effects/cloud_effect.h	(revision 9110)
+++ trunk/src/lib/graphics/effects/cloud_effect.h	(revision 9112)
@@ -119,5 +119,4 @@
     void shellCloudColor(float colorX, float colorY, float colorZ, float time);
 
-    static void flashSky(float time);
 
 private:
@@ -167,7 +166,4 @@
     int              BM;
 
-    static bool      flashSkyActivate;
-    static float     localTimer;
-    static float     flashTime;
 
 };
Index: trunk/src/lib/graphics/effects/fog_effect.cc
===================================================================
--- trunk/src/lib/graphics/effects/fog_effect.cc	(revision 9110)
+++ trunk/src/lib/graphics/effects/fog_effect.cc	(revision 9112)
@@ -19,4 +19,5 @@
 
 #include "shell_command.h"
+#include "script_class.h"
 
 // Define shell commands
@@ -27,4 +28,11 @@
 
 using namespace std;
+
+CREATE_SCRIPTABLE_CLASS(FogEffect, CL_FOG_EFFECT,
+                        addMethod("fadeIn", ExecutorLua0<FogEffect>(&FogEffect::fadeInFog))
+                            ->addMethod("fadeOut", ExecutorLua0<FogEffect>(&FogEffect::fadeOutFog))
+                            ->addMethod("activate", ExecutorLua0<FogEffect>(&FogEffect::activate))
+                            ->addMethod("deactivate", ExecutorLua0<FogEffect>(&FogEffect::deactivate))
+                       );
 
 CREATE_FACTORY(FogEffect, CL_FOG_EFFECT);
Index: trunk/src/lib/graphics/effects/lightning_effect.cc
===================================================================
--- trunk/src/lib/graphics/effects/lightning_effect.cc	(revision 9110)
+++ trunk/src/lib/graphics/effects/lightning_effect.cc	(revision 9112)
@@ -29,4 +29,5 @@
 #include "light.h"
 #include "cloud_effect.h"
+#include "script_class.h"
 
 SHELL_COMMAND(activate, LightningEffect, activateLightning);
@@ -34,4 +35,9 @@
 
 using namespace std;
+
+CREATE_SCRIPTABLE_CLASS(LightningEffect, CL_LIGHTNING_EFFECT,
+                        addMethod("activate", ExecutorLua0<LightningEffect>(&LightningEffect::activate))
+                            ->addMethod("deactivate", ExecutorLua0<LightningEffect>(&LightningEffect::deactivate))
+                       );
 
 CREATE_FACTORY(LightningEffect, CL_LIGHTNING_EFFECT);
@@ -199,5 +205,4 @@
         this->flashLight->setSpecularColor(1,1,1);
 
-        CloudEffect::flashSky(0.02);
 
         // Play thunder sound
@@ -223,5 +228,4 @@
         this->flashLight->setDiffuseColor(0,0,0);
         this->flashLight->setSpecularColor(0,0,0);
-        CloudEffect::changeSkyColor(Vector(0,0,1), 0.02);
 
         this->newCoordinates();
Index: trunk/src/lib/graphics/effects/rain_effect.cc
===================================================================
--- trunk/src/lib/graphics/effects/rain_effect.cc	(revision 9110)
+++ trunk/src/lib/graphics/effects/rain_effect.cc	(revision 9112)
@@ -29,4 +29,5 @@
 #include "light.h"
 #include "cloud_effect.h"
+#include "script_class.h"
 
 #include "parser/tinyxml/tinyxml.h"
@@ -39,4 +40,11 @@
 
 using namespace std;
+
+CREATE_SCRIPTABLE_CLASS(RainEffect, CL_RAIN_EFFECT,
+                        addMethod("startRaining", ExecutorLua0<RainEffect>(&RainEffect::startRaining))
+                            ->addMethod("stopRaining", ExecutorLua0<RainEffect>(&RainEffect::stopRaining))
+                            ->addMethod("activate", ExecutorLua0<RainEffect>(&RainEffect::activate))
+                            ->addMethod("deactivate", ExecutorLua0<RainEffect>(&RainEffect::deactivate))
+                       );
 
 CREATE_FACTORY(RainEffect, CL_RAIN_EFFECT);
Index: trunk/src/lib/graphics/effects/snow_effect.cc
===================================================================
--- trunk/src/lib/graphics/effects/snow_effect.cc	(revision 9110)
+++ trunk/src/lib/graphics/effects/snow_effect.cc	(revision 9112)
@@ -27,4 +27,5 @@
 #include "plane_emitter.h"
 #include "shell_command.h"
+#include "script_class.h"
 
 #include "parser/tinyxml/tinyxml.h"
@@ -34,4 +35,9 @@
 
 using namespace std;
+
+CREATE_SCRIPTABLE_CLASS(SnowEffect, CL_SNOW_EFFECT,
+                            addMethod("activate", ExecutorLua0<SnowEffect>(&SnowEffect::activate))
+                            ->addMethod("deactivate", ExecutorLua0<SnowEffect>(&SnowEffect::deactivate))
+                       );
 
 CREATE_FACTORY(SnowEffect, CL_SNOW_EFFECT);
