after losing specifically in this battle? something like this might work:preserve_heroes={"Elleshar", "Linaas", "Gillion", "Diraya", "Itil", "Ossir", "Nadaur"}
function Def( heroName )
if not contains(preserve_heroes, heroName) then
local owner = GetObjectOwner(heroName)
local fight_id = GetLastSavedCombatIndex()
StartCombat(heroName, "Metlirn",7,44,24,146,80,148,16,147,48,50,16,48,48,44,24)
while GetLastSavedCombatIndex() == fight_id do
sleep()
end
if not IsHeroAlive(heroName) and owner == player_number then
Trigger( REGION_ENTER_AND_STOP_TRIGGER, "def", nil)
end
end;
end;
Trigger( REGION_ENTER_AND_STOP_TRIGGER, "def", "Def" );I already know this option, thanks to various Manuals, but it doesn't match the intended purpose... I need the trigger to always activate as long as a specific player owns the location where the region is located. As soon as this player loses the battle, the trigger should be reset.