Particle Effect failing to appear within trigger activation
by William Goh (Joondalup IT TAFE) · in Torque 3D Professional · 12/02/2009 (10:30 pm) · 1 replies
I want to make a particle effect that I made appear within the trigger after my weapon has been thrown. My code is so far:
function BombTrigger::onEnterTrigger(%this,%trigger,%obj)
{
echo(%obj.getdatablock().getname());
if(%obj.getdatablock().getname() $= "BoomBotData")
{
%obj.throw(Bomb, 1);
%partID = new ParticleEmitterNode()
{
emitter = SmokeEmitter;
Velocity = 1;
position = DefaultTrigger();
datablock = SmokeEmitterNode;
};
MissionCleanup.add(%partID);
}
So my code says that after my weapon has been thrown, a particle effect placed in variable %partID will appear after it (ignoring schedule for now). But the particle isint sh and the break point seems to skip it for some reason. How can I make the particle effect appear. PS. This trigger is a new
function BombTrigger::onEnterTrigger(%this,%trigger,%obj)
{
echo(%obj.getdatablock().getname());
if(%obj.getdatablock().getname() $= "BoomBotData")
{
%obj.throw(Bomb, 1);
%partID = new ParticleEmitterNode()
{
emitter = SmokeEmitter;
Velocity = 1;
position = DefaultTrigger();
datablock = SmokeEmitterNode;
};
MissionCleanup.add(%partID);
}
So my code says that after my weapon has been thrown, a particle effect placed in variable %partID will appear after it (ignoring schedule for now). But the particle isint sh and the break point seems to skip it for some reason. How can I make the particle effect appear. PS. This trigger is a new