It's nothing special right now. I'll work more on giving it some robustness later. The whole module takes place in one city... so there isn't really any need for making the weather too crazy. I just want it to match in every area.
This works great... but I noticed something. When I switch to WEATHER_RAIN it seems to never show lightning or feel like a thunderstorm at all. Rain, in the area properties, is separate from Lightning so I imagine it might be that the SetWeather function won't change lightning at all. I just want to be sure. I'd like to actually have a chance for a real storm once in a while.
const float TIMER = 2400.0;
void TMPSetWeatherAllAreas()
{
object oModule = GetModule();
int iRand = d2();
switch (iRand)
{
case 0: SetWeather(oModule, WEATHER_CLEAR);
break;
case 1: SetWeather(oModule, WEATHER_RAIN);
break;
}
DelayCommand(TIMER, TMPSetWeatherAllAreas());
}
Why don't I get lightning?
Débuté par
The Mad Poet
, sept. 08 2013 01:34
#1
Posté 08 septembre 2013 - 01:34
#2
Posté 08 septembre 2013 - 06:09
Not sure if there's much help I can offer except a few observations.
The weather system you are probably using I assume is custom, as such I believe you have to set the weather type, as well as a call for lightning and a percentage chance for it to occur. In what I'm seeing, I don't see calls for either one of those, so maybe it's a matter of fishing for those calls, as in the standard weather system for areas, you have to set them manually.
I'll dig a little and see what I can find.
The weather system you are probably using I assume is custom, as such I believe you have to set the weather type, as well as a call for lightning and a percentage chance for it to occur. In what I'm seeing, I don't see calls for either one of those, so maybe it's a matter of fishing for those calls, as in the standard weather system for areas, you have to set them manually.
I'll dig a little and see what I can find.
#3
Posté 08 septembre 2013 - 06:20
I suspect that there's a vfx_tag for the lightning flash somewhere in the files, mixed with a:
PlaySound ("as_wt_thundercl3") and a EffectVisualEffect ( VFX_FNF_SCREEN_BUMP) or a _SHAKE and you could probably get the desired effect.
PlaySound ("as_wt_thundercl3") and a EffectVisualEffect ( VFX_FNF_SCREEN_BUMP) or a _SHAKE and you could probably get the desired effect.
#4
Posté 08 septembre 2013 - 01:07
SetWeather will not decide on lightning.
You have to specify a percentage in each area for lightning to happen.
EDIT - Area Properties - Visual - Customize Environment
When the weather script fires and the variable becomes WEATHER_RAIN, the area itself will check the % of lightning chance and set it as so. The downside to this is that each area will have its own percentage, so the lightning may not be consistent across multiple areas.
FP!
You have to specify a percentage in each area for lightning to happen.
EDIT - Area Properties - Visual - Customize Environment
When the weather script fires and the variable becomes WEATHER_RAIN, the area itself will check the % of lightning chance and set it as so. The downside to this is that each area will have its own percentage, so the lightning may not be consistent across multiple areas.
FP!
Modifié par Fester Pot, 08 septembre 2013 - 01:09 .
#5
Posté 08 septembre 2013 - 02:35
Rio- Yeah it's custom. I've not seen any VFX for the normal lightning except those from 'Call Lightning' which... though neat... is hardly typical of most thunderstorms I've been in.
As far as the screen shake and the thunder sound... I've played with those but the screen shake is just too much for casually walking around the streets of the city.
FesterPot- I figured it was the case that I would have to use the Area Properties. I was hoping that there was something I was missing in the SetWeather function that would ensure the lightning. The Snow/Rain/Lightning are separate parts. Are you saying that it will never 'Lightning' unless it's raining, right? Since this script I made checks every four hours and changes the weather it won't, say, start lightning during a clear day?
As far as the screen shake and the thunder sound... I've played with those but the screen shake is just too much for casually walking around the streets of the city.
FesterPot- I figured it was the case that I would have to use the Area Properties. I was hoping that there was something I was missing in the SetWeather function that would ensure the lightning. The Snow/Rain/Lightning are separate parts. Are you saying that it will never 'Lightning' unless it's raining, right? Since this script I made checks every four hours and changes the weather it won't, say, start lightning during a clear day?
#6
Posté 08 septembre 2013 - 02:40
That's right.
Lightning percentage only works if it is raining. Although, there have been many of us who wanted the lightning flashes without the rain, to simulate a thunderstorm outside while inside of a haunted house or some other spooky interior location, but it doesn't work that way.
FP!
Lightning percentage only works if it is raining. Although, there have been many of us who wanted the lightning flashes without the rain, to simulate a thunderstorm outside while inside of a haunted house or some other spooky interior location, but it doesn't work that way.
FP!
#7
Posté 08 septembre 2013 - 02:42
Well... that's a shame. Would be nice to be able to control the lightning. Thanks for the info!
#8
Posté 12 septembre 2013 - 02:37
Lightning also works when it snows, just FYI.
But FP is spot on - no precipitation, no lightning
#9
Posté 12 septembre 2013 - 11:26
Thanks for letting me know. I don't use snow in this module, but it's good to know for future reference.





Retour en haut







