Player Targeted:
Events
Unit - A unit owned by Player 1 (Red) Dies
Conditions
(Triggering unit) Equal to Footman 0001 <gen>
Actions
Game - Defeat (Owner of (Triggering unit)) with the message: Defeat!
Change to any player color or add player color.
Replace footman0001 with any desired unit.
-------------------------------------
General
Events
Unit - A unit Dies
Conditions
(Unit-type of (Triggering unit)) Equal to Footman
Actions
Game - Defeat (Owner of (Triggering unit)) with the message: Defeat!
Just replace "Footman" with any desired "generic unit"
Both will work, second would be better if you were using the same unit with all heroes.
And if the player has only one unit to use, then this will simply work, just make sure that if you need a certain player to exist, to put a condition in to what players will be included.
Events
Unit - A unit Dies
Actions
Game - Defeat (Owner of (Triggering unit)) with the message: Defeat!