Author Topic: Simple Emitter  (Read 625 times)

Hi, I have just been experimenting with some code and was wondering how i could set a simple emitter to a brick through an event. I have a general idea of what i have to do, but don't know exactly what to put for the setting emitter part, I don't even know if you can use setEmitter...
Code: [Select]
registerOutputEvent(fxDTSBrick,"setFire","",1);

function fxDTSBrick::setFire(%this)
{
%this.setEmitter(Fire A);
}
« Last Edit: April 21, 2009, 09:50:16 PM by lilboarder32 »

It won't work like that, I think you need to put "" around Fire A and use the datablock name, not the UI name. Set Emitter works in game.

Ok thanks I'll see if that works! Thanks for the help!

Yeah you need to use the name of the datablock.

Okay, its still not working. I'm pretty sure this is the name of the datablock, correct me if I'm wrong. This shows up in the add-ons selection, console with no syntax errors, and even in the event  list. But nothing happens if I do OnActivate>Self>setFire.

Here is the entire code:
Code: [Select]
//Fire Event

registerOutputEvent(fxDTSBrick,"setFire","",1);

function fxDTSBrick::setFire(%this)
{
%this.setEmitter("BurnEmitter A");
}

It's BurnEmitterA ; without the space. Also I don't believe you need the quote marks seeing as the burnemittera is a datablock.

It's BurnEmitterA ; without the space. Also I don't believe you need the quote marks seeing as the burnemittera is a datablock.

Doesn't make a difference. Torque's variable casting is pretty flexible.

Okay it works. Thanks everyone for your help! Locking...