Posts from Scripts
Auto-translated
I was thinking... I'll place the objects and then just move them around. It will be easier, IMHO.
to disable it, the second parameter should be ""
Added 4 minutes later
Okay, I didn't know where to write this, so I'll write it here: Is it possible to make a hero gain levels after level 40? I know it's probably nonsense, and I'll have to manually work with the amount of experience gained, but still.
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога
Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
Is it possible to use the same name for an object ('druid1') and a variable (druid1 = 0) in a script? I did this with a druid, and now the console says "object 'druid1' does not exist or is not interactive." Is this the problem, or should I check the script?
Added 1 minute ago
Is it possible to determine if a tile is occupied?
1 - if not occupied
nil - if occupied
It considers water impassable by default.
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога
Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
Added 37 minutes ago
here are a couple more questions:
1) Where is the error? The script doesn't work at all, it doesn't even try.
---transformation (trans)---
trans = 0
function trans()
while 1 do
sleep(1)
if GetObjectOwner ('elftown') == 1 and trans == 0 then
sleep(1)
ShowFlyingSign(GetMapDataPath().."trans1.txt", "Berein", -1, 7);
sleep(5)
TransformTown ('elftown' , 4)
ReplaceDwelling ('elfdwel1' , 4)
ReplaceDwelling ('elfdwel2' , 4)
ReplaceDwelling ('elfdwel3' , 4)
ReplaceDwelling ('elfdwel4' , 4)
trans = 1
end
end
end
startThread (trans)
(Everything is named correctly, as in the editor)
2) Can I immediately destroy the tavern in the town right after the transformation? (I remember asking a similar question, but I didn't quite manage it, or I was just lazy)
Hmm, thank you.
Added 37 minutes ago
here are a couple more questions:
1) Where is the error? The script doesn't work at all, it doesn't even try.
---transformation (trans)---
trans = 0
function trans()
while 1 do
sleep(1)
if GetObjectOwner ('elftown') == 1 and trans == 0 then
sleep(1)
ShowFlyingSign(GetMapDataPath().."trans1.txt", "Berein", -1, 7);
sleep(5)
TransformTown ('elftown' , 4)
ReplaceDwelling ('elfdwel1' , 4)
ReplaceDwelling ('elfdwel2' , 4)
ReplaceDwelling ('elfdwel3' , 4)
ReplaceDwelling ('elfdwel4' , 4)
trans = 1
end
end
end
startThread (trans)
(Everything is named correctly, as in the editor)
2) Can I immediately destroy the tavern in the town right after the transformation? (I remember asking a similar question, but it didn't quite work out, or I was just too lazy)
In the StartTread line, there is a syntax error. The function is written with a lowercase letter
Пробуждение зла
Нашествие из Преисподней
Смена эпох
Скачать все кампании одним архивом: Яндекс.Диск Google.Диск
You can download the set of 3 Campaigns (English version) here
Одиночные сценарии Heroes V 3.1:
Незваные гости
Красный кристалл
Синий кристалл
Закат тьмы
Мультиплеерные карты для Heroes V 3.1:
Легендарная война
Сердце вулкана
Передел мира
I'll check it now, but I'm already used to writing it this way; it doesn't seem to depend on whether it's uppercase or lowercase...
Пробуждение зла
Нашествие из Преисподней
Смена эпох
Скачать все кампании одним архивом: Яндекс.Диск Google.Диск
You can download the set of 3 Campaigns (English version) here
Одиночные сценарии Heroes V 3.1:
Незваные гости
Красный кристалл
Синий кристалл
Закат тьмы
Мультиплеерные карты для Heroes V 3.1:
Легендарная война
Сердце вулкана
Передел мира
Now I’ll try writing it with a capital letter, but this 93.734% won’t help, unfortunately.
Added 4 minutes later
No, I wrote it with a capital letter, and now the script is complaining about the function altogether.
Added 1 minute later
although, no, I probably said something nonsensical.
Пробуждение зла
Нашествие из Преисподней
Смена эпох
Скачать все кампании одним архивом: Яндекс.Диск Google.Диск
You can download the set of 3 Campaigns (English version) here
Одиночные сценарии Heroes V 3.1:
Незваные гости
Красный кристалл
Синий кристалл
Закат тьмы
Мультиплеерные карты для Heroes V 3.1:
Легендарная война
Сердце вулкана
Передел мира
Added 1 minute ago
Although, actually, no, that's not the problem. There are plenty of sleeps there... There's also a pop-up message...
Added 2 minutes ago
Damn, I changed the variable name, and it all started working. What a load of nonsense...
There's still a second question...
Added 22 minutes ago
I'm completely confused..
SetTownBuildingLimitLevel('elftown', TB_TAVERN, 0)
SetObjectDwellingCreatures('elftown' , 2, 100)
In the first case, it doesn't understand the building type, and I can't find another one. It also doesn't work with quotes.
In the second case, it doesn't want to add creatures for recruitment. Although all the creature dwellings are built.
It's terrible
In the first case, it doesn't recognize the building type, and I can't find another one. It also doesn't work with quotes.
TOWN_BUILDING_TAVERN = 4
Цикл "Закадычные враги": "Особенное гостеприимство, "Супероружие", "Меж молотом и наковальней"
"Падение Шантири"
Кампания для "Кодекса Войны"
"Выбор Сагиттеля"