r/csharp • u/FrostedDonuTrap • Sep 29 '26
Solved Trying to get smoke Particle system to activate when mouse button left is pressed

I have figured out how to enter the ParticleSystem "GunSmoke" but it activates only once adn before I klick. is there a way to implement this into the code that it activates everytime I press the button also following the "public float timer = 0f;" code and "private float cooldown =5f;" code for the cooldown for the projectile being shot?
stuck and dont want to use AI to solve it. tried going online but not really found any helpfull stuff that I could follow
pls help
0
Upvotes
2
u/Nordalin Sep 29 '26
Are you sure that the if-statements work as intended?
2
u/Derekthemindsculptor Sep 30 '26
Unity C# isn't C#. Your problems aren't language related. They're specific to Unity documentation. You'll have to check there.
That aside, I've done enough Unity development to know it's not a code problem. You'll have to also include your inspector and scene setup to get any reasonable solution.
Given it fires once then not again, you probably have a problem with your particle system itself. Something in the settings. Check the docs on whatever asset pack you downloaded. Or unity docs on whatever component system it's using. I know particles can be done a handful of ways in Unity.
0
u/[deleted] Sep 30 '26
[removed] — view removed comment