Computer Science Canada Running and stopping a particle script, without ending the whole program |
Author: | montesser [ Fri Nov 12, 2010 11:07 am ] | ||
Post subject: | Running and stopping a particle script, without ending the whole program | ||
What is it you are trying to achieve? To have my program run my snow particle / space scene, with a designated amount of time and then allow the rest of the program to continue, What is the problem you are having? I can make the particles start, but cannot stop them. Describe what you have tried to solve this problem i have tried delays, exit whens, and even exit when count. Post any relevant code (You may choose to attach the file instead of posting the code if it is too long) <Answer Here>
Please specify what version of Turing you are using Turing 4.0.4c |
Author: | Zren [ Fri Nov 12, 2010 11:52 am ] | ||
Post subject: | RE:Running and stopping a particle script, without ending the whole program | ||
Nested loops are da-bomb. Understande? |
Author: | DemonWasp [ Fri Nov 12, 2010 11:54 am ] |
Post subject: | RE:Running and stopping a particle script, without ending the whole program |
It is plain that you do not understand the code you've posted. If you did, you'd know that all you need to do is keep a "count" variable that increments each time you go through the loop labeled "main animation loop" and exit when it hits a given number (probably at least a few hundred). The only other potential issue I can see is that the display will not automatically update itself, so put commands and the like will not show up until you do a View.Update(). |
Author: | Zren [ Fri Nov 12, 2010 12:06 pm ] | ||
Post subject: | RE:Running and stopping a particle script, without ending the whole program | ||
Oh woops. >.< Re-read the question in the post instead of the topic title. Totally misinterpreted the question. As much as I do think the above is copy pasta, I disagree with the counting idea. Formally checking with the Time.Sec() would be a better alternative since it allows it to be a standard wait across all computers. You'd start with checking the time as you go into the particle engine, then every rendering of the engine, check if it's been x time since the start, and exit the loop. Eg:
|