Play the exact particle effect?
by Robert Carroll · in Torque Game Builder · 10/11/2009 (9:29 pm) · 2 replies
Is there a way to make a behavior that plays the particle thats being clicked on? Im trying to mount a particle effect to my gun barrel. So I want it to play that particle effect not its clone.
About the author
Stay Up all night playing PS3 ;) add me PSN: RCBASEBALL13.
#2
=========
function MouseClickSoundBehavior::onMouseDown(%this, %modifier, %worldPos)
{
%this.fire(1);
%explosion = %this.particleEffect.cloneWithBehaviors();
%explosion.position = %position;
%explosion.setEffectLifeMode("Kill", 1.0);
%explosion.playEffect();
}
}
=========
I got this from a behavior I didn't write I tried to merg then but it dosn't want to play it. Do I just do Play effect but do "%this.playeffect(shooteff);"?
10/12/2009 (3:42 am)
Wait Im a newbie But heres waht I got.=========
function MouseClickSoundBehavior::onMouseDown(%this, %modifier, %worldPos)
{
%this.fire(1);
%explosion = %this.particleEffect.cloneWithBehaviors();
%explosion.position = %position;
%explosion.setEffectLifeMode("Kill", 1.0);
%explosion.playEffect();
}
}
=========
I got this from a behavior I didn't write I tried to merg then but it dosn't want to play it. Do I just do Play effect but do "%this.playeffect(shooteff);"?
Associate William Lee Sims
Machine Code Games