Maybe with this code?

Click to reveal..
var g_over = 0;

function game_over()
{
if(event_type == EVENT_IMPACT || event_type == EVENT_ENTITY)
{
wait(1);
g_over = 1;
ent_remove(t_bod);
ent_remove(t_gun);
ent_create("invader_over.mdl", vector (1000, 50, 20), NULL); //create lose frame
}
}

action invader_attack()
{
var attack = 0;
set(my, PASSABLE);
while(my)
{
wait(-1);
}
}

action invader_one()
{
c_setminmax(me);
my.emask |= (ENABLE_ENTITY);
// my.event = frag;
while(1)
{
if (g_over == 1)
{
wait(1);
ent_remove(me);
}
my.pan += 0.7;
c_move (my, vector(imix, imiy, imiz), vector(imiax, imiay, imiaz), IGNORE_PASSABLE); // move the invader according to the ai action
wait(1);
}
}

action invader_two()
{
c_setminmax(me);
my.emask |= (ENABLE_ENTITY);
//my.event = frag;
while(1)
{
if (g_over == 1)
{
wait(1);
ent_remove(me);
}
my.pan += 0.7;
c_move (my, vector(imiix, imiy, imiz), vector(imiax, imiay, imiaz), IGNORE_PASSABLE); // move the invader according to the ai action
wait(1);
}
}

action invader_three()
{
c_setminmax(me);
my.emask |= (ENABLE_ENTITY);
// my.event = frag;
my.event = game_over;
while(1)
{
if (g_over == 1)
{
wait(1);
ent_remove(me);
}
my.pan += 0.7;
c_move (my, vector(imiiix, imiy, imiz), vector(imiax, imiay, imiaz), IGNORE_PASSABLE); // move the invader according to the ai action
wait(1);
}
}