Skip to content
User Avatar
#2031
Auto-translated
To avoid dealing with various constants like REGION_ENTER_AND_STOP_TRIGGER or TOME_OF_DESTRUCTION, it's better to replace them with numbers (all numbers are listed in the document IDs for scripts). This makes the code more compact and helps avoid several errors that are almost unnoticeable during debugging.

For example, the codes
Trigger(REGION_ENTER_AND_STOP_TRIGGER, "Gnom", "gnom")
and
Trigger(6, "Gnom", "gnom")
work the same, but the second entry is much more convenient to use.

Added 3 minutes later
function alive()
while IsHeroAlive("Hero9") do
sleep(10)
end
Loose()
-- or --
Loose(1)
end

function alive(heroname)
if heroname=="Hero9" then
Loose()
end
end
Trigger(2, 1, "alive")
Кампании для Heroes V 3.1 (Трилогия):

Пробуждение зла
Нашествие из Преисподней
Смена эпох

Скачать все кампании одним архивом: Яндекс.Диск Google.Диск

You can download the set of 3 Campaigns (English version) here


Одиночные сценарии Heroes V 3.1:


Незваные гости
Красный кристалл
Синий кристалл
Закат тьмы

Мультиплеерные карты для Heroes V 3.1:

Легендарная война
Сердце вулкана
Передел мира