simply add another script to the enemys action: for example:

action enemy{
robot_01; //the enemys main action
new_action; //the action to lose a key when the enemy is gore spitting and gonna die.
}
action robot_01{ [...] }
action new_action{
while(1){wait(1);
if(my._health<5) //my._health is the health-information of the enemy
{
create... //and so on
}}}


THAT S FUNNY: http://log.thedom.de/images/000508-1.jpg if you don't speak german: Hein = Name mit = with Kartoffeln = Potatos seinen Kumpels = his homies