Skip to content
#596
Auto-translated
Hello everyone!
I have two questions:
1) I'm trying to create a check for the presence of an artifact and then execute a task, but either `startThread` or `while ... do` stubbornly causes the game to freeze. I've tried everything, but nothing works. Here are the function options:
function RingF()
while HasArtefact('Giovanni',ARTIFACT_NECROMACER_PENDANT) == not nil do
SetObjectiveState('Amulet', OBJECTIVE_COMPLETED)
MessageBox(dir..'Posoh_naiden.txt')
end;
end;
startThread(RingF)

function RingF()
if HasArtefact('Giovanni', ARTIFACT_NECROMANCER_PENDANT) then
SetObjectiveState('Amulet', OBJECTIVE_COMPLETED)
MessageBox(dir..'Amulet_founded.txt')
end;
end;
startThread(RingF)
I've tried everything. What's the problem?
2) What does UnitName mean in a combat script?
Sincerely.
Мои карты:
SinglePlayer: Выбор Зехира
Падение Стедвика(pre-release)
Готовится: Зима Титанов, Столетняя война