I think it wont work if you use you as 3rd and 4th parameter since you can be NULL at anytime...
Click to reveal..

Code:
function mvbllt()
{
VECTOR bspeed, trceblt;
set(my,ENABLE_IMPACT);
my.event = rmvblts;
my.pan = camera.pan;
my.tilt = camera.tilt;
bspeed.x = 200 * time_step;
bspeed.y = 0;
bspeed.z = 0;
vec_set(trceblt, vector(75,0,0));
vec_rotate(trceblt,camera.pan);
vec_add(trceblt, camera.x);
while(my!=NULL)
{
c_move(my,bspeed,nullvector,IGNORE_PASSABLE);
if(c_trace(my.x, trceblt, IGNORE_PASSABLE| USE_POLYGON| SCAN_TEXTURE)>0)
{
rmvblts();
}
wait(1);
}



Sorry if I dont use indentation.
The rmvblts function only remove itself, you could add ent_remove(you) somewhere in the function but it will be simpler if you add ent_remove(me) in the end of mvblts function like this:
Click to reveal..

Code:
function mvbllt()
{
...
  my.skill71=0;
  while(my.skill71!=NULL) //<---Changed my to my.skill71(or any flag or var  you like)
  {
     c_move(my,bspeed,nullvector,IGNORE_PASSABLE);
     c_trace(my.x, trceblt, IGNORE_PASSABLE| USE_POLYGON| SCAN_TEXTURE)//this line can be removed if you like
     if(result>0){my.skill71=1;}
     wait(1);
   }
   ent_remove(me);
}





Last edited by bart_the_13th; 08/25/09 11:15.