Im setting particle parameter in projectile but cant get it working, it works only in begin play event… Any advices?
(I found second solution, setting material instance which works well perfectly on projectile stop, but im interested in this why this does not work…)
I was able to get this working just fine on my end. It depends on how you are referencing the particle system. I had the particle system as a component of the projectile blueprint and created a reference to that (see screenshot).
Also if you create a particle component variable type and set its default value to the particle system this won’t work. Just to be sure, are you setting the color and opacity inputs in your material to particle color? (see second screenshot for example)
Hello, for reply. Yes im setting color and opacity inputs with particle color node. Here is my BP extended, i hope this help
As you can see, one node works, second not, i dont have idea why not, the most strange part is that i found it working only in begin play event without delay node…
I’m having issues reproducing your issue. Here are the steps I took:
Create a new FPS Blueprint project
Add a new particle system and a material
Open the material and set it to translucent blend mode
Create a particle color node and plug the color output into Emissive Color
Plug the alpha output into opacity and compile then close
Open the particle system and apply the material in the required module
Click on Color Over Life module and change the alpha distribution to “Distribution Float Particle Parameter” and name it “Opacity” >** also set the constant value to 1**
Open FirstPersonProjectile and add a particle system component> assign the one you just made
Create a reference to the particle system (in even graph) > drag off then create a Set Float Parameter node and change parameter name to “Opacity” and keep the value at 0
Create an On Projectile Stop node and plug it into the Set Float Parameter
Also turn off should bounce
Play in Editor
Result The particle sprites that follow the projectile disappear when the projectile stops.
Note Setting the constant value is important so the particle is visible by default and it’s an easy step to miss which is why I put it in bold font.
If you can reproduce the issue with the steps I provided please let me know if not then it may be an issue with your assets or their implementation along the line.
I ran into a similar issue in my game: I could change the parameters in the BeginPlay() of my actor/component, but if I change them later, it would not change the visual of my ParticleSystem. In case anyone has a similar issue, my solution was to simply deactivate the system, set the parameter and activate it again. In C++, it looks like this: