How to set niagara float parameter decrease trigger by blueprint?

Hello everyone,

I am learning UE5 niagara controll by blueprint now,

and I want to control a float parameter in niagara system,

set a trigger pressed to make it decreasing in blueprint. What is a good way to do it?

Any answer will be appriciated.

Thank you

Hey there @543764! Welcome to the community! So basically you need a couple of things. A blueprint with a reference to the Niagara system you’re adjusting. In my case I just have it as a child of the character, but you could instead instantiate it if you’d prefer and get that ref.

Then you’re going to need to make a new user parameter in the Niagara system itself.

Hitting either of those will spawn a sub menu

image

The from there, you’ll click float, name it something memorable. I named mine NewVal in this example.

image

So now let’s tie the parameter to one of the Niagara variables shall we? Click the spawn rate of your system (if that’s the float you wanna change) Then click drag the NewVal over to it like this gif. This binds the variable.

UnrealEditor_2022-08-16_22-59-59

Now you’re gonna need an event, the reference to your Niagara instance, and this node.

image

And Voila, you have a button that can change the spawn rate of this Niagara system!

2022-08-16_23-02-23

I hope this was in depth enough to explain it!

Is there anyway to change the parameter of an Niagara Actor in scene?

Hey there @King-Nguyen! Welcome to the community! In this case, the tutorial I wrote here does exactly that. Are you trying to expose and alter the native System Attributes? If so, unfortunately no these aren’t runtime editable, though you can override where they are processed with a User Variable and manipulate that the same way as I added the link above. What’s your use case?

I think I understand it know, I could change the niagara parameter now
Thanks for your support

Great! If you have any trouble or any questions, let me know!

the pattern for the decrease over time:

spawn system at location returns the niagara component, promote it to a variable. add a float user parameter in the system (for example Intensity), and use it in the emitter wherever you need it (multiply the spawn rate or a curve by it).

on trigger pressed, start a timeline with a float track from current value down to 0 (or your min), and on the timeline update pin call set variable float on the component with that parameter name and the timeline value. stop the timeline at trigger released or at zero. a repeating timer subtracting a step with a clamp works too if you prefer no timelines.

two things the tutorials usually skip:

set the parameter before activate so the first frame already uses the right value, activating first means one frame at the wrong intensity.

the blueprint dropdown only shows parameters in the user namespace, and only a handful of types have set nodes at all. system, emitter and particle namespace values are simply unreachable with stock nodes. if you hit that wall, the Expose Niagara Variables C++ & Blueprints plugin exposes all 8 namespaces and 18 variable types with the matching getters, in blueprint and c++, so the same decrease pattern works for any parameter on the system: Expose Niagara Variables C++ & Blueprints | Fab