- Home /
particles emitter loop
I am making a particle emitter that turn on and after a few seconds turns off.. but I don't know how to repeat this action. Want I what is to make the emitter go on and off and then after a few seconds repeat this action.. How do I do this??.. I really don't know.
This is not specific to particles at all. Because I've seen so many posts that would yield your answer, here and on the forum, I don't believe you put in any effort trying to figure this out for yourself, so, downvote.
Answer by LyanApps · Apr 02, 2013 at 02:26 PM
float time = 0.0f; //Time aggregate variable
float toggle_time = 10.0f; //Time between toggling particles
function Update(){
time += Time.deltaTime;
if(time > toggle_time){
particleEmitter.enabled = !particleEmitter.enabled; //Toggle
time = 0.0f; //Reset the timer
}
}
Your answer
Follow this Question
Related Questions
All instances of particle emitter prefab are emitting when emit=true 0 Answers
How to destroy spawned particle?,How to delete all particle spawned? 0 Answers
Making a hologram effect with particle emitter 2 Answers
Dynamically change particle range of Ellipsoid Emitter. 1 Answer
Camera.Render() & DockArea:OnGUI() seemingly random & unrelated errors after particles launch 0 Answers