Hi,

I'm trying to shoot and remove an enemie using lite-c.
The player can shoot a rocket, if the rocket hits the enemie it should be removed. But it doesn't..

Could someone look at my code aand give my some advice?

Code:
//////////////////////////////////////////////////// Enemie one

function enemie_one_handle()
{
	wait(1);
	ptr_remove(me);
}

function enemie_one_management()
{
	my.emask |= (ENABLE_BLOCK | ENABLE_ENTITY | ENABLE_SHOOT); // make entity sensitive for block and entity collision
   my.event = enemie_one_handle;
   
   my.pan += 180;
} 

function create_enemie_one()
{
	VECTOR enemie_start_position;
	
	enemie_start_position.x = ent_player.x+100;enemie_start_position.y = ent_player.y;enemie_start_position.z = ent_player.z;
	ent_create ("soldier.mdl", enemie_start_position, enemie_one_management);`
}

///////////////////////////////////////////////////////////////


//////////////////////////////////////////////////////// Rocket

function rocket_handle()
{
	wait(1);
	ptr_remove(me);
}

function rocket_movement()
{
	my.emask |= (ENABLE_BLOCK | ENABLE_ENTITY); // make entity sensitive for block and entity collision
   my.event = rocket_handle;
   
	VECTOR temp;
	
	// Set the rocket position and pan direction.
	vec_for_vertex(temp, ent_player, 361);
	my.x = temp.x;my.y = temp.y;my.z = temp.z;
	my.pan = ent_player.pan;
	
	while(1)
	{
		c_move(my,vector(30*time_step,0,0),nullvector,IGNORE_PASSABLE | GLIDE | EVENT_SHOOT); //moves the rocket
		wait(1);
	}
}

///////////////////////////////////////////////////////////////




The more you have.. the more you can lose...
Dont tell em all you know.....