Rain particles start immediately (during sunny weather) instead of waiting for cloud transition timeline

Hi everyone,

I’m having a persistent issue with my weather system logic that I can’t seem to figure out. The system is designed to cycle randomly between sunny weather and rain.

My setup is in a single Blueprint actor (BP_WeatherManager) which is replicated:

The Logic

  1. Main Timer Logic (Server Only): I have a chain of timers (Set Timer by Event) that run only on the server.

    • On BeginPlay, a timer (e.g., 10-15s) calls Trigger_StartRain.

    • Trigger_StartRain (which checks if IsRaining is false) calls the Server_StartRain event. It then sets a new timer (e.g., 30-60s, the “Rain Duration”) to call Trigger_StopRain.

    • Trigger_StopRain (which checks if IsRaining is true) calls the Server_StopRain event. It then sets a new timer (e.g., 50-70s, the “Sun Duration”) to call Trigger_StartRain.

    • This creates a correct, non-looping chain.

  2. Server Events:

  3. Client-Side Effect (The OnRep_IsRaining function):

    • When IsRaining becomes TRUE: It Plays a 10-second Timeline (WeatherTransition). This Timeline handles interpolating (Lerp) material parameters for the volumetric clouds (making them dark) and the directional light.

    • When IsRaining becomes FALSE: It calls my StopRain function (to destroy particles) and plays the Timeline in Reverse (to clear the clouds).

  4. Starting the Particles (The intended part):

    • The StartRain function (which spawns the Niagara particle “bubble” attached to the player) is called ONLY from the Finished pin of the WeatherTransition Timeline.

The Problem

The first cycle works perfectly:

  1. Sun (10-15s).

  2. Server_StartRain is called.

  3. OnRep fires –> Timeline plays –> Clouds gather (10s).

  4. Timeline Finished –> StartRain is called –>Rain particles begin. (Perfect!)

  5. Rain (30-60s).

  6. Server_StopRain is called.

  7. OnRep fires –> StopRain is called (particles stop) –> Timeline reverses (clouds clear). (Perfect!)

Here is the bug:

After the StopRain timer (e.g., 50-70s) fires, the next cycle begins.

  1. Server_StartRain is called.

  2. OnRep fires –> The Timeline starts playing (clouds start gathering).

  3. At the exact same time, the StartRain function (particles) is also called, causing it to rain immediately while the sky is still sunny.

  4. Then, 10 seconds later (when the timeline finishes), StartRain is called again (I can tell from the audio restarting).

Why is StartRain being called immediately on the second cycle, even though the Finished pin hasn’t fired yet? It seems like something is incorrectly “remembering” the Finished state from the previous run.

Any ideas would be greatly appreciated. Thanks!