Trigger(PLAYER_REMOVE_HERO_TRIGGER, PLAYER_2, 'Player2LoseHero');
function Player2LoseHero(looser, winner)
if(looser == 'hero_name') then
...
end
end
Additional checks might be needed if the target hero can be lost in ways other than being killed by a player.