Author Topic: Storm Mod: Thunder and Lightning (1.0)  (Read 15030 times)

This could be coded a lot better. But I suppose you're still learning?

Here's a better way to toggle a storm;

Code: [Select]
function serverCmdStorm(%client) {
   if(!%client.isSuperAdmin)
      return;
     
   if(!$stormOn) {
$stormOn = 1;
storm_f1();
messageAll('', "<color:F08D0C>Warning<color:FFFFFF>: The National Weather Service has just issued a Thunderstorm Warning for this area.");
   } else {
$stormOn = 0;
messageAll('', "<color:F08D0C>Update<color:FFFFFF>: Thunderstorm Warning cancelled as of" SPC getDateTime());
   }
}

This could be coded a lot better. But I suppose you're still learning?

Here's a better way to toggle a storm;

Code: [Select]
function serverCmdStorm(%client) {
   if(!%client.isSuperAdmin)
      return;
     
   if(!$stormOn) {
$stormOn = 1;
storm_f1();
messageAll('', "<color:F08D0C>Warning<color:FFFFFF>: The National Weather Service has just issued a Thunderstorm Warning for this area.");
   } else {
$stormOn = 0;
messageAll('', "<color:F08D0C>Update<color:FFFFFF>: Thunderstorm Warning cancelled as of" SPC getDateTime());
   }
}
I planned on cleaning up the code later. That's not on my priority list at the moment, though. The code you posted is just another way of performing my code. I prefer to have /start /stop commands separately.


I just don't like the idea of having to do a /command to start and stop an effect like this. Mods feel unfinished with them.
I am gonna hold off till the /commands are removed.

Could we get a video? Eh I'll do it.



http://www.youtube.com/watch?v=QQ-9q-ieIIM
Nice video! For the record, occasionally, you won't hear a crack of thunder, or just hear a rumble. This is random, and a bug that turned into a feature. Some strikes might be far away, so you can't hear them. And it makes it a lot less annoying.

Here's a better way to toggle a storm;
I don't think that pirates would have access to the National weather service

Make it so you can toggle an option for random times that a storm would automatically start.


It'd be really cool if you could somehow add this as an environment option

yay, it has been made!  :cookieMonster:

Decent add-on here.  Thanks.

sky needs to light up :s

and the rain needs an ambient sound