Skip to content
User Avatar
#1736
Auto-translated
RedHeavenHero
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 a lua function, through whose first parameter the player's response is reported (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.

thx, but I don't quite understand all the components of the function. I need a clear example. I need to ask the player a question with 4 response options, and they must choose one of them
Кампании для Heroes V 3.1 (Трилогия):

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

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

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


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


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

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

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