Game Development Community

Adding particle emitters on the fly?

by Simon Meistininkas · in Torque Game Engine · 07/09/2002 (5:53 pm) · 3 replies

Is it possible to add a particle emitter in script so for example if a gun "misfires" I could add a new particle emitter w/ like a new ParticlEmitter(){ etc. };
?
I've tried many ways, but ran into problems, such as particleEmitter not be a console dynamic class.

Has anyone had success with this? Or adding particle emitters to missions?

Thanks

#1
07/10/2002 (2:53 pm)
Yeah, I wanted to do this too. Its not too hard at all. Just spawn a projectile that does no damage, then make it explode. You can get a nice shower of particles.

If you want something that happens over a long period of time, like a gun smoking, you really should just put the emmitter on there in the first place.
#2
07/10/2002 (3:35 pm)
To add a particle emitter to a mission simply use a ParticleEmitterNode, you can add that one from the mission editor, and to use a particle emitter for the misfire you said you can call new emitters from script.
like mEmitter = new ParticleEmitter() blah blah
Check for some other examples to see how to do it
#3
05/17/2003 (12:43 pm)
Where in the world builder can I find what I need to use for attachign particle emitters to objects in the world?