Niagara - "Set Emitter Enable" BP Node does not work?

Hi,

I’ve a Niagara system with multiple emitters and I’d like to enable / disable some of them from time to time. The “Set Emitter Enable” node sounds totally right for this purpose but it simply doesn’t work as far as I can tell. Is this a bug or does the node require some specific system setup to work properly?

Thanks,
Daniel

4.25.1 and here is the code behind that node:


void FNiagaraSystemInstance::SetEmitterEnable(FName EmitterName, bool bNewEnableState)
{
WaitForAsyncTickAndFinalize();
UE_LOG(LogNiagara, Warning, TEXT("SetEmitterEnable: Emitter \"%s\" is not currently implemented."), *EmitterName.ToString());
return;
}

Really wish there were less of this in the engine lol.

However, what works is making a user param float (set it to 0, or 1) and multiplying it with the spawn rate.

2 Likes

Can you give some hint about how to “multiply” an user param to a value inside SpawnRate module?

Click the dropdown on the right side of the value and select Multiply Float.

https://i.gyazo.com/a44d618c8ae24dfe455e3336fd8a690a.png

This turns it into 2 values, where you can enter the spawn rate into one, and turn the other into your variable.

https://i.gyazo.com/3ffbac3c0142674794afdd48da30df71.png

3 Likes

4.26.1 still not implemented!

5.0.1 - still not implemented :face_holding_back_tears:

I’m controlling it with the spawn probability value.

image

image

2 Likes

For those curious why Niagara components have a function that is not implemented: Niagara and Cascade share a common interface (UFXSystemComponent) that defines SetEmitterEnable as a function. But Niagara’s emitter scripts are all compiled into one big system script, so there is currently no way to dispatch them separately.

You can work around it for now by using user parameters to set spawn count to 0 or disable rendering.

2 Likes

Epic updated the ticket in the issue tracker. Looks like the " SetEmitterEnable" function finally gets it’s implementation with 5.4 :star_struck:

1 Like

Better late than never I guess :sweat_smile:

1 Like