ParticleSystem.startLifetime [Solved]

Hi

Creating a smoke effects with particles, when a flying object is close to the ground, I want to make it disappear when this object is far from it too. If I use a

groundSmoke.gameObject.SetActive (false);

I will make it immediately disappear, it’s working, but it’s not what I want, because smoke don’t trigger “off” in 1 frame.
so I try to use ParticleSystem.startLifetime to set up the life time of paticles to 0

                myparticles = groundSmoke.gameObject.GetComponent<ParticleSystem>();
                myparticles.startLifetime = 0;

It “working”, BUT I have still one particle flickering on the screen (probably appearing and dying immediately).
Anyone would know how to resolve this?

Second question, I now need to get the right values again on this particle system the next time the flying object will be close to the ground again.

            myparticles= groundSmoke.gameObject.GetComponent<ParticleSystem>();
            myparticles.startLifetime = 1;

but is it possible possible to place two values instead of this “1”, to get back to my setup with a “Random between two constant”, allowing my particles to live between 1 and 3 seconds for instance?

Thx.

I’l look to this tutorial about particles to check if there might be an answer,
http://unity3d.com/learn/tutorials/modules/beginner/live-training-archive/particle-systems?playlist=17102
but if you have any other link or beginning of answer to my question, It would be very appreciated!

Cheers!

Edit:
Even if the video is interesting, it’s NOT in their, (does not speak about Particles scripting)

Edit2:
I manage to deal with the 1st question by approaching it differently