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 }}}