4.21 Niagara Module Script "Sample Spline Position by Unit Distance" confusion

Hi! I made a custom Niagara Module that samples and feeds in positions along a spline for each particle in my system:

The issue I’m having is that I have 2 splines in the blueprint with this Niagara component!


I don’t seem to have a way to tell the “Sample Spline Position by Unit Distance” function *which *spline I intend it to sample. Furthermore, the spline that gets sampled seems to be non-deterministic. When I “simulate” the level, it samples the spline I want (LightningSpline), but when I play the game, it samples the other spline (MasterSpline).

Here’s an image of the desired effect working properly:

The yellow (Master) spline is used to drive the movement of the pink (Lightning) spline so that the pink spline can have some dynamic movement while maintaining its zig zagginess. Sometimes, during play mode, the Niagara component decides to sample the yellow spline though which makes for very boring lightning.

Is there anyone here familiar with the inner workings of that “Sample Spline Position by Unit Distance” function that can help me? I’m guessing I either need a fix to my blueprint hierarchy that would make sure the Niagara component never samples the incorrect Master spline, or I need a way to give Niagara a direct reference to which spline I intend it to sample.


If anything is unclear in this post, please let me know.