Auto-translated
Here's the question. I'm working on a task where I need to eliminate a specific hero (Orson). But I want to give the player a choice, so there's a branching path, which means two functions: one for "accepting" the task and one for "refusing" it. The refusal function works, but the execution function doesn't. Maybe I made a mistake somewhere? Could you please take a look? Also, the console doesn't seem to be reporting any errors. It just does nothing. Although the trigger seems to be set correctly.
function SuppGlutt()
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, "Straker", nil);
end;
Trigger(PLAYER_REMOVE_HERO_TRIGGER, "Straker", "SuppGlutt");