Game Development Community

ParticleEmitterName

by Rubes · in Torque Game Engine · 08/02/2006 (6:05 pm) · 6 replies

Just a quick note...

I did a fast search for the term "ParticleEmitterName" and got nothing.

In the TLK Modeler's Guide, in the section "Linking Lights to Particle Systems", it says:

Quote:
Lights are linked to particle systems by setting the light object's 'ParticleEmitterNode' property to the name of the target particle emitter node."

I did this, and didn't see much of a change. Then I looked at the sgLightingPackDemo.mis file, since I knew there was a fire object in that, and sure enough the code uses "ParticleEmitterName". I switched my code to "ParticleEmitterName = emitterNode" and it worked nicely.

Just an FYI...

#1
08/02/2006 (6:13 pm)
That info will prove handy in the near future dont dump this thread plz
#2
08/03/2006 (6:06 am)
Ouch - good catch, I'll make a note of that for the next release, thanks!
#3
08/03/2006 (10:40 am)
Along the same lines, John...

There is a reference in the TLK guide to Illuminated Particle Systems, whereby you can illuminate particles using the "AllowLighting" property in the particle datablock.

I searched through the C++ code and I'm reasonably sure the property should be called sgAllowLighting, is that correct?

I gave it a try but I'm not sure if it did much, but I'm using a very small, limited particle system (candle flame) so I'm not sure how much effect I could really see anyway.
#4
08/03/2006 (9:39 pm)
SgAllowLighting is the C++ name but it's exposed to script as AllowLighting. The 'sg' prefix was added to the C++ code to help identify TLK and non-TLK code. It was omitted from the script variables to make scripting easier and more consistent.
#5
08/03/2006 (9:57 pm)
I see...I saw this code from particleEngine.cc (in ParticleData::initPersistFields()):

//-----------------------------------------------
   // Lighting Pack code block
   //-----------------------------------------------
   addField("sgAllowLighting",      TypeBool,   Offset(sgAllowLighting, ParticleData));
   //-----------------------------------------------
   // Lighting Pack code block
   //-----------------------------------------------

Doesn't that mean the variable exposed to script is also named sgAllowLighting?
#6
08/03/2006 (10:04 pm)
Hmm... interesting. Thats actually a source code typo. Unfortunately it will probably stay that way otherwise everyone's particle lighting will stop working after upgrading. :/

Again, good catch! :)