Good afternoon, please tell me how I can implement the following idea using a script: There are 2 secondary quests (SO-1), to capture a neutral town and it is initially included in the tasks, and (SO-2), to control the surrounding mines, which is a hidden quest. The goal is to make quest SO-2 visible immediately after capturing the neutral town. I tried to do something similar, but it turned out to be not very good, and is it possible to get a tutorial on this problem?
function detencion()
if GetObjectOwner("Dwarftown")==PLAYER_1 then
SetObjectiveVisible("SO-2", bVisible, "nPlayerID = 1")
Trigger(OBJECT_CAPTURE_TRIGGER,"Dwarftown1", "detencion")
end
end
Trigger(OBJECT_CAPTURE_TRIGGER, "Dwarftown1", nil)
Why is the trigger attached to the object "Dwarftown1", but the player's ownership is checked for the object "Dwarftown"? And what is "nPlayerID = 1"? It is enough to simply put 1 instead of "nPlayerID = 1" if the map is single-player, or PLAYER_1. You also need to add SetObjectiveState("SO-2", 2, 1). The trigger should be attached after the function, and reset within the function body. You have it the other way around.
Пробуждение зла
Нашествие из Преисподней
Смена эпох
Скачать все кампании одним архивом: Яндекс.Диск Google.Диск
You can download the set of 3 Campaigns (English version) here
Одиночные сценарии Heroes V 3.1:
Незваные гости
Красный кристалл
Синий кристалл
Закат тьмы
Мультиплеерные карты для Heroes V 3.1:
Легендарная война
Сердце вулкана
Передел мира