Marc, You are calling the "lightning_strike" function directly
in "rainthatshit". This is causing a lightning strike every frame that
"ObservationConditions == ocGood".

The way it is set up, the clouds with the "lightning_cloud" action call that
function if the variable "lightning_on" is equal to 1, and a random number
( 0 to 1), is larger than the "lightning_freq" variable.


1. Change rainthatshit so that it just changes the "lightning_on" flag instead
of using it to call the "lightning_strike" function;

Code:

action rainthatshit
{
my.skill1 = 4000; // Range to scan for rain...
while(1)
{
if (vec_dist(my.x, player.x) < my.skill1)
{
if (ObservationConditions == ocAverage)
{
rainit();
OpSound(on);
}
if (ObservationConditions == ocGood)
{
rainit();
OpSound(on);
lightning_on = 1; // turn lightning on
}
else{ lightning_on = 0;} // turn lightning off
}
else
{
OpSound(off);
}
wait(1);
}
}



2. Attach the "lightning_cloud" action to several clouds or entities in the
sky, the lightning will emit from these clouds origin.

3. Change the variable "lightning_freq = 0.985" to a higher or lower number
to change how often the lightning strikes. (Higher = less)

That ought to fix it. Hope it helps anyway.


Not two, not one.