/////////////////BURN
//
function Base_Effect_base_event(PARTICLE* p) {
p.vel_x = p.skill_x*p.skill_d/50;
p.vel_y = p.skill_y*p.skill_d/50;
p.vel_z = p.skill_z*p.skill_d/50;
p.skill_d = (p.skill_d + time_step*(var)1.000)%100;
}

function Base_Effect_base(PARTICLE* p) {
p.size = 2;
p.alpha = 100.000;
p.red = 128;
p.green = 128;
p.blue = 128;
p.skill_c = 0.5;
p.vel_x = random(2.000)+(-1.000);
p.vel_y = random(2.000)+(-1.000);
p.vel_z = (3.000);
p.lifespan = 10;
p.gravity = 0.000;
p.bmap = fire3_map;
p.flags = BRIGHT | TRANSLUCENT | MOVE;
p.skill_x = p.vel_x;
p.skill_y = p.vel_y;
p.skill_z = p.vel_z;
p.event = Base_Effect_base_event;
}

/////////////////////////////////emitter actions/////////////////////////////////

action Base_Effect_emitter() {
var eff_frac; eff_frac = 0;
wait(1);
while(my) {
parted_temp_vec.x = 0.000;
parted_temp_vec.y = 0.000;
parted_temp_vec.z = 0.000;
vec_add(parted_temp_vec,my.x);
eff_frac += 0.100*time_step*0.001;
if(eff_frac >= 1){
effect(Base_Effect_base,integer(eff_frac),parted_temp_vec,nullvector);
eff_frac -= integer(eff_frac);
}
wait(1);
}

}
/////////////////////////////////creation/////////////////////////////////

function fire_create(VECTOR* position) {
if(!position)position = nullvector;
wait(3);
you = ent_create(NULL,position,Base_Effect_emitter);
if(you) {
vec_add(you.x,vector(-128.786,-19.160,0.000));
vec_set(you.pan,vector(0.000,0.000,0.000));
vec_set(you.scale_x,vector(1.000,1.000,1.000));
set(you,PASSABLE);
set(you,INVISIBLE);
}
}

/////////////////////////////////////////////////
function PUTOUTOFNOWHERE(ENTITY* oonwPIECE){ //put the piece out of no where once eliminated

Base_Effect_emitter();//this is the action of the burning effect
wait(1);
//i want to stop the burning effect just right here
oonwPIECE.z = 10;
oonwPIECE.flags |= TRANSLUCENT;
oonwPIECE.alpha = 0;
oonwPIECE = NULL;

wait(1);

}