- Home /
How to increase max particles in a particle system against a timer?
I have a game in which I'd like to have smog in the environment increase over time to obscure the player's view. Each level is 30 seconds long. I have a level timer game object with a timer script on it and a smog game object with a particle system on it. My solution was to have the timer script adjust the max particles in the system over time to increase the smog. It sort of works. The timer script successfully found the particle system and can set the max particles in start, but I'm having trouble increasing the max particle count over time.
First, I tried to check it against the time variable in the timer and set the particle count that way, but it didn't work. Now I'm starting to think some kind of loop or coroutine might be more appropriate, but I don't have a ton of experience with either and am having a tough time troubleshooting with my limited knowledge.
Am I going about this the right way or is there a way more efficient way to go about making a particle system more dense over time? I don't mind doing the research and trying solutions out, but I just want to know if I'm at least heading in the right direction.
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
Returning an IEnumerator as an int? 1 Answer
C# get-time code 3 Answers
On Collision Enter Method Stuck With Slow Motion Time 1 Answer