This requires heroes from version 3.1
TalkBoxForPlayers "Opens a dialog with multiple answer options (from 1 to 5) for selected players (playersFilter).
The function does not display error messages because if the parameters are incorrect, default values are used."
playersFilter PlayersFilteringConstantsID Identifier of the 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, through whose first parameter the player's answer is communicated (number: 0 - cancel, -1 - closed by the game, 1.. - the number of the answer selected by the player)
mode Type of mode: 0 - with an OK button, 1 - OK/Close
titleTextRef Path to the window title text
selectTextRef Path to the title text before the selection options
defaultOption Number of the answer that is highlighted by default (number: 0 - none, 1.. - the number of the answer)
optionTextRef Path to the text of answer #1
[optionTextRef] Path to the text of answer #...
… [Answer Number]
Here is an example:
a1=(GetMapDataPath().."a1.txt");
a2=(GetMapDataPath().."a2.txt");
a3=(GetMapDataPath().."a3.txt");
a4=(GetMapDataPath().."a4.txt");
TalkBoxForPlayers (PLAYER_1, "/Textures/Icons/Heroes/Academy/Academy_Razzak_128x128.(Texture).xdb#xpointer(/Texture)", "", GetMapDataPath().."v.txt", "", "func", 0, GetMapDataPath().."v.txt", "", 0, a1, a2, a3, a4)
Thank you for the advice, but I probably won't need it right now, as I'm making maps for version 3.0. If I ever use version 3.1, I will definitely try it out.
I have a couple more questions.
Firstly, when a hero touches a specific object that gives him a skill, no animation is displayed (like "you have gained the Logistics skill"). The skill is added, but no information about it is communicated to the player. Is there a way to fix this?
Secondly, is it possible to add some kind of anti-cheat to the map? Of course, you can write a lot of things in the scripts to ban a player for cheating in certain situations, but is there a simpler way to do this?
Пробуждение зла
Нашествие из Преисподней
Смена эпох
Скачать все кампании одним архивом: Яндекс.Диск Google.Диск
You can download the set of 3 Campaigns (English version) here
Одиночные сценарии Heroes V 3.1:
Незваные гости
Красный кристалл
Синий кристалл
Закат тьмы
Мультиплеерные карты для Heroes V 3.1:
Легендарная война
Сердце вулкана
Передел мира