Jul 18, 2011 at 11:15 PM
Edited Jul 18, 2011 at 11:16 PM
Hi. Yes, this is a bug.
When the particle system is processed, it runs a simulation on the system to see how many particles it will create. Unfortunately, there is a typo in the code that runs the simulation.
If you open the file:
On line 1260 change (make sure to get the right line!):
ParticleSystemEmitterLogic data = parent.SystemData.Triggers[index];
ParticleSystemEmitterLogic data = parent.SystemData.ToggleTriggers[index];
Run the build again to update the processor.
Toggles aren't needed very often, and my test case for them uses both triggers and toggles - so it didn't catch this crash.
In your case, I imagine a standard Trigger would be more suitable for a rocket (almost any temporary effect is likely going to work better with a Trigger).
If you setup your trigger to generate a smoke puff / sparks, etc for a single frame, then fire the trigger every frame the rocket is alive (with the position set to the rocket position).
The has two advantages: Only one Toggle can exist at once whereas you can specify how many instance of a Triggers to keep in memory with the 'allocation_multiplier'. So for a rocket trail, this might be (say) 64. Then at no point will there be more than
64 puffs of smoke active at any one time. Secondly, toggles need to be turned on and off - whereas a trigger is fire and forget. Also, you will likely need to use the 'gpu_buffer_position' flag for your system. Keep it in mind :-)