Proper set-up for a Niagara system that needs variables set at start-up?

I’m trying to create a Niagara ‘dissolve’ effect on a ragdoll- the idea is that the player kills an enemy, it goes into ragdoll, and then ‘dissolves’ via a particle effect. I’ve got a user parameter for the mesh. Setting that parameter is fine, unless I want to use the ‘spawn burst instantaneous’ module to create the particles.

With the above, unless I add a delay to when the ‘spawn burst instantaneous’ fires, it doesn’t have the mesh parameter set when it fires. As such, it uses the default pose, rather than the ragdoll pose. If I do add a delay- even 0.01 so it gets deferred to the next frame- it works fine. But that’s a workaround- surely it must be possible to set these variables before the system starts?

There’s two blueprint functions- one labelled ‘spawn system at location’ and one labelled ‘spawn system at location with params’, but they have completely different signatures

spawning

Does anyone have any idea about how you’re supposed to use the second of these? It has no inputs, only outputs, and the outputs don’t allow you to specify which system you’re spawning, nor set the variables.

Thanks!

1 Like

Still not got a good solution for this- the most reliable thing I’ve got so far is to add two ‘delay until next tick’ nodes before destroying the underlying actor.

But this seems really messy. Does anyone have an explanation of how ‘spawn system at location with params’ works? The documentation (Spawn System at Location with Params | Unreal Engine Documentation) just lists exactly the same information that’s on the node itself

Thanks in advance!

1 Like

I have this same question, and I’m surprised the documentation still isn’t better since 2022… does anyone know how to use Spawn with parameters?

surprised the documentation still isn’t better since 2022

Oh, my sweet summer child.

1 Like

(Read the my post below and then see this)

This is an example from Lyra (Plugins\ShooterCore Content\Gameplay Cues\GCNL_Death) that shows how to set Niagara variables before activating the Niagara System Component:

(Just edited because one of my posts was not approved (??))

I know this is a very late reply but this thread just popped up on Google for a related question I had so I figured I’d answer it.

The “Spawn System at Location with Params” node is not what you want if you want to spawn a Niagara system and set some Niagara parameters at the same time. The input to this node is a struct of type FXSystemSpawnParameters, which basically has the same data as “Spawn System at Location”:

One way to do what you want is by doing the following: 1) Spawn your system with the “Auto Activate” parameter set to false. 2) Set the Niagara variables you care about. 3) Activate the Niagara component. My post above shows an example from Lyra that does that.

1 Like