The three virtues of a programmer: Laziness, Impatience, and Hubris. – Larry Wall


From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search

Land of the Dead includes a WeatherEffect class, based on AdvancedActor. It seems to be somewhat similar in function to UT2003's xWeatherEffect class, but a vastly different implementation.

The AdvancedPlayerController (LOTD) contains a property called "theWeatherEffect", which is an emitter that produces the current weather.

When a Pawn is Possess()ed, it will query the first found "WeatherEffect" actor, for it's "WeatherEffect" property, and will then spawn the returned class, and SetBase() it to the pawn.

Configurable Properties[edit]

private class<Emitter> WeatherEffect 
Specifies the emitter to be used for the WeatherEffect for this level


It doesn't appear that by default, there is any way to make this zone specific, so it may be difficult to use it in levels that mix indoor and outdoor environments. It may be possible to subclass ZoneInfo or Volume to call (AdvancedPlayerController).DisableWeatherEffects() when entering, and (AdvancedPlayerController).EnableWeatherEffects() when leaving, or to completely sub the PlayerController to allow for querying the current ZoneInfo or Volume, instead of the entire level for the WeatherEffect to create. I'm thinking changing the (AdvancedPlayerController).GetWeatherEffects() to search the Zone for actors of type WeatherEffect, rather than the level, might be the best way to improve upon this. Of course, this generates other issues, such as being able to see outside from an inside zone, and it is not raining until you actually walk outside. That could probably be solved with various mapping tricks, however.