Spawn a particle emitter ?
by ... · in Torque Game Engine · 08/29/2006 (9:43 am) · 2 replies
Hi
I want to spawn a particleemmiter on a certain postions . How should i do this ?
%smoke = new ParticleEmitterNode()
{
dataBlock = "testSmokeEmitterNode";
//sourceObject = %obj.sourceObject; //what are these for ?
//sourceSlot = %obj.sourceSlot; ...
//client = %obj.client; ...
position = %vec;
};
MissionCleanup.add(%smoke);
tnx,
Robin.
I want to spawn a particleemmiter on a certain postions . How should i do this ?
%smoke = new ParticleEmitterNode()
{
dataBlock = "testSmokeEmitterNode";
//sourceObject = %obj.sourceObject; //what are these for ?
//sourceSlot = %obj.sourceSlot; ...
//client = %obj.client; ...
position = %vec;
};
MissionCleanup.add(%smoke);
tnx,
Robin.
About the author
#2
....
%smoke = new ParticleEmitterNode()
{
emitter = testSmokeEmitter;
velocity = 1;
position = %vec;
rotation = "0 0 0";
datablock = testSmokeEmitterNode;
};
MissionCleanup.add(%smoke);
....
Tnx Tim . I found it in the particleEditor scripts.
08/29/2006 (10:26 am)
This is how it works ....
%smoke = new ParticleEmitterNode()
{
emitter = testSmokeEmitter;
velocity = 1;
position = %vec;
rotation = "0 0 0";
datablock = testSmokeEmitterNode;
};
MissionCleanup.add(%smoke);
....
Tnx Tim . I found it in the particleEditor scripts.
Torque Owner Tim Heldna
This is how I spawn projectiles, same theory applies to particle nodes:
%p = new (projectile)() { dataBlock = explosionProjectile; initialVelocity = 3; initialPosition = %obj.getPosition(); sourceObject = %obj; sourceSlot = 2; }; MissionCleanup.add(%p);