void main() { object oMe=OBJECT_SELF; object oDamager=GetLastDamager(); if (GetIsObjectValid(oDamager)) { // object exists AssignCommand(oMe,ClearAllActions(TRUE)); AssignCommand(oMe,PlayVoiceChat(VOICE_CHAT_PAIN1)); if (GetObjectSeen(oDamager,oMe)) AssignCommand(oMe,ActionMoveAwayFromObject(oDamager,TRUE,80.0)); } // object exists }