function player_fires() //da sistemare con i livelli
{
proc_kill(4);
if(lvl == 1){
while ((key_space == on) || (mouse_left == on)) {wait (1);} // wait until the player releases the keys
vec_set (temp.x, my.x);
temp.x += 70; // the laser is generated in front of the ship
snd_play (fire2_wav, 40, 0);
ent_create (laser2_mdl, temp, move_bullet1);
}
if(lvl == 2){
vec_set (temp.x, my.x);
temp.x += 70; // the laser is generated in front of the ship
ent_create ("bullet3.mdl", temp, move_bulletlvl2);
}
if(lvl == 3){
vec_set (temp.x, my.x);
temp.x += 70; // the laser is generated in front of the ship
you=ent_create ("bullet3.mdl", temp, move_bulletlvl3);
}
}