Skip to content
User Avatar
#2726
Auto-translated
REMOVE_HERO_TRIGGER works slightly differently.
Trigger(PLAYER_REMOVE_HERO_TRIGGER, player number, 'function to which the names of the lost hero and its victor (or nil) will be passed')

So, it should be something like this:
function SuppGlutt (looser, winner)
if(looser == "Straker") then
SetObjectiveState("Qnecro", OBJECTIVE_COMPLETED);
RemoveObject("Isher");
SetObjectOwner("gorodZemlya", 1);
ChangeHeroStat("RedHeavenHero04", STAT_EXPERIENCE, 15000);
ChangeHeroStat("RedHeavenHero04", STAT_MORALE, 1);
ChangeHeroStat("RedHeavenHero04", STAT_LUCK, 1);
Trigger (PLAYER_REMOVE_HERO_TRIGGER, number, nil);
end;
end;

Trigger (PLAYER_REMOVE_HERO_TRIGGER, player number to which the desired hero belongs, "SuppGlutt")
Нет войне.