I've got a general question to particles that is how do i manage that particles which are created randomly around a certain point are drawn to this point. like a vortex in space that sucks everything in but without the swirl?
function p_light_move(PARTICLE* p) {
vec_diff(p.vel_x,vector(p.skill_a,p.skill_b,p.skill_c),p.x);
vec_scale(p.vel_x,0.25);
p.alpha += 6*time_step;
p.size += 1*time_step;
p.size = minv(p.size,11);
if(p.alpha > 80) { p.lifespan = 0; }
}
function p_light(PARTICLE* p) {
p.skill_a = your.x;
p.skill_b = your.y;
p.skill_c = your.z;
vec_set(temp,vector(random(20)-10,random(20)-10,random(20)-10));
vec_scale(temp,20);
vec_add(p.x,temp);
set(p, MOVE | BRIGHT | TRANSLUCENT);
p.alpha = 0;
p.size = 2;
p.event = p_light_move;
}
Then in a while loop or a single statement: effect(p_light,5,my.x,NULL);