Game Development Community

Particle Emitters not loading

by ChrisG · in Torque Game Engine · 02/03/2008 (6:44 pm) · 1 replies

I tried placing a camp fire particle emitter using the Particle Editor in TGE 1.5 (F5)

The emitter placed ok, but after saving the mission and then restarting Torque, the emitter doesn't startup, and disappears from the world editor tree.

I get the follow error in the log during the mission load

Object 'TestEmitterNodeData' is not a member of the GameBaseData' data block class


Is there a bug with the particle editor or am I missing something?

#1
02/03/2008 (11:20 pm)
Ok fixed this one

The problem was that the datablock for TestEmitterNodeData is being defined in creator/editor/particleEditor.cs which is being loaded BEFORE GameBaseData is defined.

To Fix the problem I created a new file server/particles.cs in which I defined the datablock - simply:
// this is to make the particle editor work properly
datablock ParticleEmitterNodeData(TestEmitterNodeData)
{
	timeMultiple = 1;
};

and then in server/game.cs added:

exec("./particles.cs");