Mounting particle effects to shapes?
by mm · in Torque Game Engine · 04/16/2004 (10:26 am) · 9 replies
Hello I just have a quick question. How do I mount a particle effect to a static shape? I am guessing that the shape will need to have a node to mount the particle effect. Any help will be greatly appreciated. :)
Matt
Matt
About the author
#2
04/19/2004 (2:18 pm)
If your going to be putting it on a static shape, there is no reason to mount it since static shapes don't move.
#3
and if you do need static shapes, Josh is right, no need for mounting then, just create them at the shape's transform/position...
04/19/2004 (10:41 pm)
If all you want to do is spawn particle effects you really dont want/need ANY shapes for that... just write a little script that creates particle emitters at random locations on your map (you can restrict the area, make sure they are above the terrain etc. pretty easily)...and if you do need static shapes, Josh is right, no need for mounting then, just create them at the shape's transform/position...
#4
Stefan, spawning particle effects through a script would be coming very close to what I had in mind. Thanks again for the input!
Matt
04/20/2004 (9:19 am)
Thanks for the replies, guys. :)Stefan, spawning particle effects through a script would be coming very close to what I had in mind. Thanks again for the input!
Matt
#5
I use this for a vehicle creation effect.
04/20/2004 (11:56 am)
If you don't know how to spawn emitters through script already, heres an example for ya.I use this for a vehicle creation effect.
function vehicleCreationFX(%pos)
{
%obj = new ParticleEmitterNode() {
position = %pos;
rotation = "0 0 1 100";
scale = "1 1 1";
dataBlock = "DefaultEmitterNode";
emitter = "VehicleSpawnEmitter";
velocity = "1";
};
%obj.schedule(2900, "delete");
}
#6
Matt
04/20/2004 (11:59 am)
Thanks Josh! No I didn't know yet how to spawn particle effects via script. :)Matt
#7
10/23/2006 (10:48 am)
I'm trying to use your example of spawning an emitter with script but it isn't working. Any help is greatly appreciated.
#8
10/23/2006 (1:11 pm)
Did you define a particle datablock called VehicleSpawnEmitter ?
#9
10/23/2006 (1:17 pm)
Actually I did and I got it to work finally... Woo Hoo ! Now I just need to spawn my fireplace bricks which is a static object so I've got to look through the ::create stuff.
Torque Owner mm
Matt