Creating Custom Functions to hold X amount of Niagara User Parameters?

Hey all. I’m trying to figure out an efficient way on creating a custom function which can be used to hold any type and amount of Niagara User Parameters. I have all of these User Parameters (others in other systems as well):

image

I’ve set up a Struct to hold the general information on what I would like my Function to hold:

I’ve created a Function within the Function Library so that I can use this function throughout my setup:

I’m trying to find a way to allow myself to add /remove any amount of these ‘Input’s’ as I would like because it’s not always the same amount of User Parameters that I would have.

I’m trying to avoid having to do this all the time:

Hopefully that makes sense. If I’m just being dumb, and there is actually a way that I haven’t thought of, PLEASE let me know.

Cheers,

Maybe you could change the input type to an Array:

This way you can add as many pins as you want using the “Make Array” node.

Hope this helps.

Thanks for the reply. However, it looks as if I can’t even get a reference to a parameter type from a Niagara system, even with ‘Context Sensitive’ off…

Would there be an alterative way to make this process a bit easier?

I’m also kinda new with the Niagara System, but could you explain what exactly you are trying to do? You basically want to set multiple niagara parameters (and/or with multiple types) with a single function, am I right?

yeah, thats right :slight_smile:

Just something I don’t have to keep adding individual nodes every time I create a new BP using these Niagara User Parameters.

Okay! I will show you a way and although I don’t know if it is the optimal way, it gets the job done. What you can do is create a struct as the following:

it should contain all the information you need to set a parameter, as well as an EParticle Sys Param Type variable and all the possible values you want to set. (in the example above I just included the most important ones)

Now make a function with input an array of this struct. Then you can do it this way:

Basically, you determine the Parameter Type using the enum and the code switches to the appropriate node that sets that parameter.
This way, you can easily set multiple parameters, using the “Make array” node:

Make sure to always choose a type through the enum and set only the value type you are interested in. If it gets too crowded you can simply hide pins that you won’t use like this:

Hope this makes sense.

PERFECT! Thank you so much!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.