I have an action that shoots out a flare and has a following trail. all done with particle effects. however, I want to be able to generalize the formula. so that instead of having a different function for each type of flare, i can put in parameters and have it be different.

however, particle functions are called without the parenthesis. how can i pass a function parameters with no parenthesis?

IE:

effect(rocket_particle, 1, my.x, init_velocity.x);



function rocket_particle(image, psize, life, color)
{
if(my.lifespan == 80)
{
my.bmap = image;
my.size = psize;
my.move = on;
my.red = color.x;
my.blue = color.y;
my.green = color.z;

my.flare = on;
my.alpha = 255;
my.bright = on;
my.gravity = 3;

my.lifespan = life;
}
.......
}


thank you for your time.

Last edited by hungryhobo; 01/04/10 04:05.