Event - A unit dies
Condition - Dying unit (belongs to an ally of player <whatever team player>)
Action - hero revive instantly at (<wherever>), show revival graphic
Now do one for the other team (is this what you meant?)
you might need the condition dying unit is a hero equals to true
this is because if you are able to control mercenaries/regular units, they will revive also.