Skip to content

Posts from Scripts

4.8 (8 ratings)
User Avatar
12 years ago
Auto-translated
attempt to call a nil value - in both cases, with accepting and declining the question box.
Also, the blue player refused to capture nearby dwellings during their turn, although they might not have wanted to.

Whatever
In reply to Heroist
User Avatar
12 years ago
Auto-translated
I completely forgot! This error shouldn't affect anything. To remove the error message, you need to slightly modify the last two functions.
function burnok(hut)
	Trigger(4, hut, nil)
	hutt = hutt + 1
	HAVEN_DWLS[hut] = nil
	return function()
	end
end

function burnno(hut)
	SetObjectEnabled(hut, 1)
	Trigger(4, hut, nil)
	sleep(1)
	MakeHeroInteractWithObject('Nymus' , hut)
	sleep(1)
	SetObjectEnabled(hut, nil)
	Trigger(4, hut, "BurnHavenDwelling")
	return function()
	end
end
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
User Avatar
12 years ago
Auto-translated
Thank you very much! I will definitely try to complete a feat and continue studying Lua.

Added 30 minutes later
Yes, and here's another question: if you click "OK" after the question, will the trigger never be activated again on that object? And will it become completely inaccessible to everyone?

And one more thing - about icons. Let's say it's possible for resources, but not for creatures. What about spells? Is the icon display also done through something else?

Whatever
In reply to Heroist
User Avatar
12 years ago
Auto-translated
yes, by the way, if you click "OK" after the question, will the trigger never be activated on that object again? And will it become completely inaccessible to everyone?
Yes. You can also set a low priority for the AI so that it doesn't keep clicking on it.
and another thing - about icons. Let's say you can do it for resources, but not for creatures. What about spells? Is the icon display also implemented in a strange way?
A crash is unlikely. Maybe we can add pop-up text saying "such and such spell has been learned"?
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
User Avatar
12 years ago
Auto-translated
Yes, that's what I did. It just looks nicer with icons, though.

Added 2 hours and 27 minutes ago
Well, and the last question for today. WHERE do I create AdvMap dialogues? I usually replace these things with regular cutscenes, but today I felt like working in NivalStyle.

Whatever
User Avatar
12 years ago
Auto-translated
The "dialogs" property in the map's properties tree. One of the topics in this section describes how to create them.

Added 3 minutes ago
topic
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
User Avatar
12 years ago
Auto-translated
But it's all quite simple. After struggling with the videos))) I was interested in whether I had created it correctly and how the editor names the created scene.
Thank you very much again)

Added after 16 hours and 12 minutes
Is it possible to set a very high priority for Player 4, for example, but for a moving object, such as another hero of Player 3?

Whatever
User Avatar
12 years ago
Auto-translated
Can anyone describe the structure and properties of the talkbox function? I can't find a proper description.
Кампании для Heroes V 3.1 (Трилогия):

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

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

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


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


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

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

Легендарная война
Сердце вулкана
Передел мира
In reply to MasteR
User Avatar
12 years ago
Auto-translated
Copypasted from a fan manual.<col width="41" style="width: 31pt; mso-width-source: userset; mso-width-alt: 1450;"> <col width="249" style="width: 187pt; mso-width-source: userset; mso-width-alt: 8846;"> <col width="177" style="width: 133pt; mso-width-source: userset; mso-width-alt: 6286;"> <col width="518" style="width: 389pt; mso-width-source: userset; mso-width-alt: 18432;">
func TalkBoxForPlayers Opens a dialog with several response options (from 1 to 5) for selected players (playersFilter).
The function does not issue error messages because if parameters are incorrect, default values are used
playersFilter PlayersFilteringConstantsID Identifier of selected players
iconRef Reference to the icon texture
iconTooltipRef Path to the icon tooltip text
textRef Path to the dialog text
addTextRef Path to the dialog text (additional)
callback String with the name of the lua function, whose first parameter conveys the player's response (number: 0 - cancel, -1 - closed by player, 1.. - number of the response selected by the player)
mode Mode type: 0 - with OK button, 1 - OK/Close
titleTextRef Path to the window title text
selectTextRef Path to the header text before selection options
defaultOption Number of the response highlighted by default (number: 0 - none, 1.. - response number)
optionTextRef path to response text № 1
[ optionTextRef] Path to response text № ...
[Response number]


Added after 3 minutes
The player who answered the question and the response number (responses 1-5, non-natural values indicate that the window was closed) are passed to the function with the name provided as the callback parameter.
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
In reply to RedHeavenHero
User Avatar
12 years ago
Auto-translated
RedHeavenHero
It's possible, but the attractor doesn't work well with heroes. It's better to use MoveHero.

MoveHero isn't very good either, as it somehow doesn't find a suitable path, and I can't understand why...

Whatever
User Avatar
12 years ago
Auto-translated
This can only happen if there is an obstacle in the path (static object, region, disabled garrison, etc.), or if there is no path at all. Monsters should not be an obstacle.
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4
User Avatar
12 years ago
Auto-translated
Region? What region are you talking about?)))

Even a region that isn't suitable for that hero and player, and even with the WITHOUT_STOP_TRIGGER, will still be an obstacle?!

Whatever
User Avatar
12 years ago
Auto-translated
No, of course, it's just blocked.

Added after 50 seconds
What path does it follow? Just a road, or are there portals, stairs...?

Added after 1 minute
Before sending it, you can check if the cell is reachable using CanMoveHero(hero, x, y, floor).
Карты для Героев Меча и Магии 5
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога

Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4

Statistics

Welcome our newest member: recijeb