Auto-translated
Does anyone know how TalkBoxForPlayers works?
New here? I'm Roha — want a quick tour?
Does anyone know how TalkBoxForPlayers works?
check my maps – everything is clearly described there (with variables – it's clear from the name)
and in which ones exactly?
Where can I get an icon, and how does the "TALK" function work?
By number. This function returns the number of the selected answer in the callback.
Does this function actually work everywhere? When I enter it into the script editor, it doesn't recognize it as a function (it doesn't highlight it in red).
Yes, it definitely works, but only in version 3.1 of the game. It seems you are writing scripts directly in the editor; it would be better to use MapScriptEditor – it's clearer (it's a separate program).
Regarding the 'TALK' function:
function TALK(g1,g2) --response to a choice--
answer=0;
if g1>0 then ask=1; answer=g2; end;
end;
Do I need to explain it, or is it clear? And of course, you need to make TalkBoxForPlayers modal, for example like this:
ask=0; TalkBoxForPlayers (....); while ask<=0 do sleep(2); end;
After that, you write the conditions:
if answer==1 then
else
if answer==2 then
.........
and so on.
Why force them to run across the entire map when you can just teleport them?
Is it possible to implement a check for the presence of a monster on the map?