Skip to content

Current questions and answers regarding the map editor.

User Avatar
#4544
Auto-translated
Please tell me what I am doing wrong.
Zehir dies, but the quest doesn't fail, and the game continues.
Your check is only performed once – at the beginning of the game.
To have the check run throughout the game, you need to place the condition in a loop.
function CheckAlive()
while IsHeroAlive('Zehir') do
sleep(5)
end
SetObjectiveState('kill', OBJECTIVE_FAILED)
Loose()
end

startThread(CheckAlive)
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4