Hi EvilSOB,
I think you should change your screen name to "pretty nice guy" grin

I tried 1,2,and 3 with no success, but you have definitely educated me. But just so you know I am not just posting questions about things which I am too lazy to research. I have been looking thoroughly for any answers in the manuals and I have searched the forum and code snippets for similar problems. I usually dont like to ask questions unless I just cannot proceed any further, and that is the awful predicament I find myself in here.


As for the number 4 I understand what you mean, but im not sure how I might perform a check to see if the ME is no longer valid. Is there any way you could explain it to me or point me in the right direction of an example? Just for the sake of completeness I have posted the new code below showing the changes I have already made:


Code:
action entity_example()
{

play((my.skill99=max_ents++));
  
 
}


Code:
function my_event()
{

switch (event_type)
  {
    case EVENT_BLOCK:
      beep();
      gt=5;
      break;
    case EVENT_ENTITY: 
     beep();
      break;
  }

      
  }
  


function play(entity_number)
{	


	my.emask |= (ENABLE_BLOCK | ENABLE_ENTITY ) ; 
   my.event = my_event();
   
	STRING* rec_str = str_create("_______"); // stores the name of the recorded data file
	STRING* temp_str = str_create("___"); // just a temporary string


	var filehandle;
   
	str_cpy(rec_str, str_for_num(temp_str, entity_number)); // create the name of the data file depending on entity's number
	str_cat(rec_str, ".txt"); // and then add it the ".txt" extension
	
	
	filehandle = file_open_read(rec_str); // now we can try to open the file
    
   if (filehandle)
   {
   
		var temp = 0;
	VECTOR tempStore;
      VECTOR tempStorePan;
      VECTOR tempVector;
      
      var spaceFind;
      var totalSpaces=0;
      var count=0;
		
		while(file_find(filehandle, " ")>=0)	count++;
  
      file_seek (filehandle, 0, 0);	// reset read position back  	
         
		   while(temp < count)
		   {
		 	   tempStore.x=file_var_read(filehandle);
			  	tempStore.y=file_var_read(filehandle);
			   tempStore.z=file_var_read(filehandle);
			   tempStorePan.x=file_var_read(filehandle);
			   tempStorePan.y=file_var_read(filehandle);
			   tempStorePan.z=file_var_read(filehandle);
			   my.frame = file_var_read(filehandle); // and put them inside the array
			   
          
			   // rotate towards target
				vec_set(tempVector, tempStore.x);
				vec_sub(tempVector, my.x);
				 vec_to_angle(my.pan, tempVector);
				
				//move to it with collision
			   c_move(my, vector(5 * time_step, 0, 0), nullvector, IGNORE_PASSABLE | GLIDE);

		
			 temp +=1;
			 wait(1);
			  
	      }
	      
	
		file_close(filehandle); // close the file
		beep();
   }	
    	
	
}



Thanks again