Putting out a fire
by Tasty Green Pees :-, · in General Discussion · 04/14/2006 (9:09 am) · 13 replies
I want to be able to switch off a particle emitter (fire) during the game. does anyone know how to do this.
About the author
#2
04/14/2006 (9:57 am)
Well if you delete() the particle emitter in question. it will stop.
#3
@ Ramen: if I use theh delete(0 function is there a way that on can "switch" it back on again?
04/14/2006 (6:55 pm)
@ Donaled: the idea was to use a trigger. But it was the code part that I was unsure of.@ Ramen: if I use theh delete(0 function is there a way that on can "switch" it back on again?
#4
04/14/2006 (9:01 pm)
Well, you'd have to generate the emiter again.
#5
04/18/2006 (2:31 am)
Do you know how to re-generate the emitter by code once I've deleted it by code?
#6
04/18/2006 (5:44 am)
The same way you created it in the first place ;)
#7
can anyone please clarify :(
meaning where in the scripts can I do I get this to work again.
04/18/2006 (5:52 am)
:( The way I created it was in the *.mis file.new ParticleEmitterNode(fire) {
position = "-111.329 -792.6 192.797";
rotation = "1 0 0 0";
scale = "1 1 1";
dataBlock = "fireParticleEmitterNode";
emitter = "fireParticleEmitter";
velocity = "1";
};can anyone please clarify :(
meaning where in the scripts can I do I get this to work again.
#8
I dont know why no one ever wants to give a stright answer to people around here.
I do however sugest you pick up that new torque book =)
Its hella helpfull.
04/18/2006 (6:55 am)
Yes, just wrap that in a function that gets called by somthing,make sure you put this in a .CS file, and make sure that file gets loaded, and if your doing a multyplayer game, make sure this is on the server. Now you just need an EVENT to call this function ( by name its FireOn() )function FireOn()
{
new ParticleEmitterNode(fire) {
position = "-111.329 -792.6 192.797";
rotation = "1 0 0 0";
scale = "1 1 1";
dataBlock = "fireParticleEmitterNode";
emitter = "fireParticleEmitter";
velocity = "1";
};
}I dont know why no one ever wants to give a stright answer to people around here.
I do however sugest you pick up that new torque book =)
Its hella helpfull.
#10
04/18/2006 (1:43 pm)
Quote:I dont know why no one ever wants to give a stright answer to people around here.Probably because people who are "spoon fed" the answers learn less and/or more slowly.
#11
04/18/2006 (1:55 pm)
I just wanted to state i didnt give a straight answer becuase I didn't know how to code it. I do apologize if I came off in a flippant way. Do you think the book is better than the 3daig book? I have not seen any real issues pop on the site and that is very encoraging... even if i spell that word right.
#12
i'm sure it's not too hard to add something in the C-side but i'd rather not reinvent the wheel.
tia,
orion
04/07/2009 (9:58 am)
sorry for the necromancy action, but is there a better method for turning a particle emitter off & on than deleting & recreating it ?i'm sure it's not too hard to add something in the C-side but i'd rather not reinvent the wheel.
tia,
orion
#13
so added a resource to do it.
04/07/2009 (10:19 am)
i didn't see any support for something like this in the C,so added a resource to do it.
Torque 3D Owner Donald "Yadot" Harris
Marveloper