Auto-translated
It doesn't help, the problem is still the same – the quest doesn't fail, no one loses, and the console doesn't see any errors.
And the "1" is there because the quest fails for the first player.function onObjectCapture( prevOwner, newOwner, hero, object )
if prewOwner == PLAYER_3 and newOwner == PLAYER_2 then
Trigger( OBJECT_CAPTURE_TRIGGER, 'houseElf', nil )
SetObjectiveState ('q4', OBJECTIVE_FAILED, PLAYER_1 )
sleep(10)
Loose()
end
end
Trigger(OBJECT_CAPTURE_TRIGGER, 'houseElf', 'onObjectCapture' )
function onObjectCapture(PrevOwner, NewOwner)
if PrevOwner == 3 and NewOwner == 2 then
Trigger(5, 'houseElf', nil)
SetObjectiveState ('q4', 4, 1)
sleep(10)
Loose()
end
end
Trigger(5, 'houseElf', 'onObjectCapture')
You need to be more careful with variable names
Кампании для Heroes V 3.1 (Трилогия):
Пробуждение зла
Нашествие из Преисподней
Смена эпох
Скачать все кампании одним архивом: Яндекс.Диск Google.Диск
You can download the set of 3 Campaigns (English version) here
Одиночные сценарии Heroes V 3.1:
Незваные гости
Красный кристалл
Синий кристалл
Закат тьмы
Мультиплеерные карты для Heroes V 3.1:
Легендарная война
Сердце вулкана
Передел мира
Пробуждение зла
Нашествие из Преисподней
Смена эпох
Скачать все кампании одним архивом: Яндекс.Диск Google.Диск
You can download the set of 3 Campaigns (English version) here
Одиночные сценарии Heroes V 3.1:
Незваные гости
Красный кристалл
Синий кристалл
Закат тьмы
Мультиплеерные карты для Heroes V 3.1:
Легендарная война
Сердце вулкана
Передел мира