Now, to the point, I'm having trouble with the scripts again, plus there are some misunderstandings in the tasks. Specifically, I created a task where, like in all campaigns, the hero must survive:
Name Primary
Kind HERO_MUST_SURVIVE
Parameters Mihael
Along with the Hero, the monk in his army must not die. Therefore, I attached a script that a kind person suggested to me:
function PrimaryF
while 1 do
if GetHeroCreatures("Mihael","9")<1 then
SetObjectiveState("Primary",OBJECTIVE_FAILED);
break;
end;
end;
end;
startThread("PrimaryF);
Thank you in advance.
Поиграем :smile13: