Mount a particle on a player
by Marcus Araujo · in Technical Issues · 01/22/2008 (6:44 am) · 6 replies
How can I mount a particle on a player? Like a simple smoke?
About the author
#2
But I have only the torque version 1.5.2 and I dont have ascess to this page with that have my ansower.
If possible to you copy the content I'll say to you: thank you.
http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=10893
01/22/2008 (7:15 am)
Ok, But I have only the torque version 1.5.2 and I dont have ascess to this page with that have my ansower.
If possible to you copy the content I'll say to you: thank you.
http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=10893
#3
%smoke = new t2dParticleEffect()
{
scenegraph = %this.scenegraph;
};
%smoke.loadEffect("~/data/particles/smoke.eff");
%smoke.mount( %this, "0 0", 0, true , true, false, false);
%smoke.setEffectLifeMode("KILL", 0.025);
%smoke.playEffect();
}
If you create a function like this and then call it using "smoke(%this)" or passing it the name of the object you want you can create and mount the particle effect
currently in the setEffectLifeMode its switched to kill on 0.025, which means the particle effect will last for 0.025 seconds. Change it to whatever you want
Hope this helps
01/22/2008 (4:09 pm)
Function smoke(%this){%smoke = new t2dParticleEffect()
{
scenegraph = %this.scenegraph;
};
%smoke.loadEffect("~/data/particles/smoke.eff");
%smoke.mount( %this, "0 0", 0, true , true, false, false);
%smoke.setEffectLifeMode("KILL", 0.025);
%smoke.playEffect();
}
If you create a function like this and then call it using "smoke(%this)" or passing it the name of the object you want you can create and mount the particle effect
currently in the setEffectLifeMode its switched to kill on 0.025, which means the particle effect will last for 0.025 seconds. Change it to whatever you want
Hope this helps
#5
01/23/2008 (6:19 am)
You need to make engine changes to support the new particle emitter attached to the player object. There are already particle emitters in the player class. Look how they are implemented.
Torque Owner Jules
Something2Play