Game Development Community

Modify Emitter file (.emm) in TGB

by Hugo Munoz · in iTorque 2D · 07/16/2011 (7:29 pm) · 2 replies

hey Guys, I have a created some particle effects some time ago, each effect is formed by a variety of emitters, and programmatically Im attaching a special emitter depending on the object my player is colliding with. here is an example:

// Add Collision Emitter.
%emitter = "game/data/particles/SwordEmitter" @ %materialType @ ".emm";
if (isFile(%emitter))
{
%emitterObject = %SwordEffect.addEmitter(); .......


The purpose of this is when my player hits an enemy, some blood will appear, when he hits the enemy shield some sparkles and so on.

Well, my problem is that I dont have a way to edit the Special Emitter because is not bound to the particle effect anymore, and its on binary format. Is there any way to re-attach or load an emitter file (.emm) to an existing particle effect so I can modify it ?

Thanks in advance.



#1
07/17/2011 (7:34 am)
I do not see any functions that accomplish what you are asking Kevin. Emitters and particles are tied together, loaded from the binary file. The shortcut I can think of is hiding the two particle effects offscreen. They should be disabled so they are not calculated. When you need one, enable it and mount it to the location you need. When the effect ends, unmount it and move it off screen again.
#2
07/18/2011 (8:58 pm)
I see, I thought the same, I accidentally removed the emitter from the particle effect in TGB, and there is no way to add an existing emitter to a particle effect in the editor, in consequence is imposible to edit it's parameters.

Maybe in the future will be good to use XML or plain text to store particles config data (.eff and .emm)