Posts from Scripts
Auto-translated
build is a local variable-counter for the loop; it sequentially takes values from TOWN_BUILDING_DWELLING_1 (its numerical value is 7) to TOWN_BUILDING_DWELLING_7 (13), and the line SetTownBuildingLimitLevel('houseInferno', build, 0) is executed for each of these values. i is the same counter, but with values from 1 to 2, so that the upgrade of each building is performed twice (construction + upgrade).
local week = ceil(GetDate(DAY)/7)
yes, that was my mistake. GetDate(WEEK) returns the week number of the month, so it will be 4 times higher on any 4th week. It should be rewritten like this:local week = ceil(GetDate(DAY)/7)
Is this version 3.1 of the game?
yes, that was my mistake. GetDate(WEEK) will return the week number of the month, i.e., it will be 4 times larger on any 4th week. It needs to be rewritten like this:local week = ceil(GetDate(DAY)/7)
-- global variable
week = 1
function NewDayF()
dow = GetDate(3)
if dow == 1 then
week = week + 1
end
end
Trigger(0, "NewDayF")
I usually do it this way.
Пробуждение зла
Нашествие из Преисподней
Смена эпох
Скачать все кампании одним архивом: Яндекс.Диск Google.Диск
You can download the set of 3 Campaigns (English version) here
Одиночные сценарии Heroes V 3.1:
Незваные гости
Красный кристалл
Синий кристалл
Закат тьмы
Мультиплеерные карты для Heroes V 3.1:
Легендарная война
Сердце вулкана
Передел мира
-- global variable
week = 1
function NewDayF()
dow = GetDate(3)
if dow == 1 then
week = week + 1
end
end
Trigger(0, "NewDayF")
I usually do it this way.
Is this supposed to be added at the very top of the code? So that everything happens in order?
-- global variable
week = 1
function NewDayF()
dow = GetDate(3)
if dow == 1 then
week = week + 1
end
end
Trigger(0, "NewDayF")
I usually do it this way.
Well, there's not much difference, of course, but without 3.1, you still won't get very far. And I always try to get rid of global variables.
It won't work. It's hard to explain, but the combat script functions imply a single action/cast. Here, there are actually two (selecting the type of arrow + selecting the spell). This means there isn't a suitable function. For the same reason, you can't cast teleport with a script (selecting the target + selecting the location). But you can try to emulate the arrow action – first, cast "Rain of Arrows," and then the desired spell on the units that will take damage after the volley.
Added 1 hour and 4 minutes ago
It won't work. It's hard to explain, but the combat script functions imply a single action/cast. Here, there are actually two (selecting the type of arrow + selecting the spell). This means there isn't a suitable function. For the same reason, you can't cast teleport with a script (selecting the target + selecting the location). But you can try to emulate the arrow action – first, cast "Rain of Arrows," and then the desired spell on the units that will take damage after the volley.
How many arch-enemies did you choose?