Events
Unit - A unit dies
Conditions
((Dying Unit) is a hero) equal to true
Actions
Unit - Remove (Dying Unit) from the game
Should work like this, but I didn't test it (currently WE not available)
Edit:
OK, I just saw Sopho answered in another topic to the same question. Plz, use the old topic if you have further questions to the same topic.