soooooo .... grin laugh

der schuss musste auch noch ne collision mit dem feind haben

Code:
function shoot_1_event()
{
 
 shoot_1(i);
  wait(35);
 i++;	
}

function shoot_1(i)
{ 
 //if(shoot_var == 1)		
 //{
 // shoot_var = 0;	
 
 
   
  snd_play(laser, 90, 0); 

  _shoot[i] = pan_create("bmap = shot.bmp;",5);
  _shoot[i].pos_x = _ship.pos_x+30  - bullet_width / 2;
  _shoot[i].pos_y = _ship.pos_y-20;  
  _shoot[i].flags |= VISIBLE;
    
//  shoot_var = 1;	
  
  
  
 while(_shoot[i] != NULL)
 {
  if(_shoot[i].pos_y > 5)
  {
   _shoot[i].pos_y -= 1;	      
  }
  else
  {
   reset(_shoot[i],VISIBLE); 
   break;
  }   

  if ((((_shoot[i].pos_x + bullet_width >= enemies[i_2].pos_x) && (_shoot[i].pos_x + bullet_width <= enemies[i_2].pos_x + enemy_width)) ||
			((enemies[i_2].pos_x + enemy_width >= _shoot[i].pos_x) && (enemies[i_2].pos_x + enemy_width <= _shoot[i].pos_x + bullet_width)))
			&& (((_shoot[i].pos_y + bullet_height >= enemies[i_2].pos_y) && (_shoot[i].pos_y + bullet_height <= enemies[i_2].pos_y + enemy_height)) ||
			((enemies[i_2].pos_y + enemy_height >= _shoot[i].pos_y) && (enemies[i_2].pos_y + enemy_height <= _shoot[i].pos_y + bullet_height))))
   {
				score += 20; 
			   snd_play(explo, 90, 0); 
			     
				reset(_shoot[i], VISIBLE); 
				_shoot[i] = NULL; 
			    
				
				enemies[i_2].bmap = explo1_tga; 
				wait (6);
				enemies[i_2].bmap = explo2_tga;
				wait (6);
				enemies[i_2].bmap = explo3_tga;
				wait (6);
				enemies[i_2].bmap = explo4_tga;
				wait (6);
				
				reset(enemies[i_2], VISIBLE); 
				create_enemy(i_2);
   	
	}	
  
  wait(1);
 }
  _shoot[i] = NULL;	
 //} 
}



und bei create_enemy musste noch weiter gerechnet werden mit i_2++;

Code:
function create_enemy(i_2)
{
enemies[i_2] = pan_create("bmap = enemy2.bmp; flags = VISIBLE;", 20);
enemies[i_2].pos_x = random(650);
enemies[i_2].pos_y = random(350);
enemy_collisions(i_2);
i_2++; // hier !!
}




und noch nen paar sachen wie health bar , score , leben (zeigt noch die i var an tongue )