Connection ErrorBad RequestThis page went staleSession ExpiredSign in requiredForbiddenNot FoundToo Many RequestsServer ErrorBad GatewayService UnavailableGateway TimeoutHTTP Version Not Supported
Session Expired
Your session has expired. Please log in to continue.
Sign in required
You need an account to do that. Sign in or create one — it only takes a minute.
This page went stale
Your security token was rejected, usually because the page sat open too long or you signed in elsewhere. Nothing was saved. Reload the page and try again.
Request Failed
We encountered an issue while processing your request.
Please check your internet connection and try again.
Error Details:
Share Link
Posts from Current questions and answers regarding the map editor.Auto-translated
There's still the issue with TalkBox.
function TalkBF(num)
tlkb=num;
end;
TalkBoxForPlayers(1, '', '', GetMapDataPath().."skolko.txt", '', "TalkBF", 0, GetMapDataPath().."skolko.txt", '', 0, GetMapDataPath().."skolko1.txt", GetMapDataPath()..."skolko2.txt", GetMapDataPath()..."skolko3.txt", GetMapDataPath()..."skolko4.txt");
Instead of an icon, there's a white screen. This is understandable; I don't know where to find a suitable one. The main text isn't displayed (to the right of the icon). The function doesn't work as it should.
Added 1 minute later
RedHeavenHero
As an object - yes, but as a hero, it exists for scripts even if it's dead or in the tavern.
function ubratF()
while (ubr==0) do
sleep(5);
for i=0,6 do
local t1, n1=GetObjectArmySlotCreature("RedHeavenHero01", i);
if (t1~=0) and (n1>1) then
RemoveHeroCreatures("RedHeavenHero01", t1, n1/4);
end;
end;
sleep(8);
MessageBox(GetMapDataPath().."chuma.txt");
ubr=1;
end;
sleep(5);
end;
startThread(ubratF);
This snippet doesn't work
TalkBoxForPlayers(1, '', '', GetMapDataPath().."skolko.txt", '', "TalkBF", 0, GetMapDataPath().."skolko.txt", '', 0, GetMapDataPath().."skolko1.txt", GetMapDataPath().."skolko2.txt", GetMapDataPath().."skolko3.txt", GetMapDataPath().."skolko4.txt"); Instead of an icon, a white screen is displayed. This is understandable; I don't know where to find a suitable one. The main text is not displayed (to the right of the icon). The function doesn't work as it should.
if ((dd==3) and (tlkb==1)) or ((dd==4) and (tlkb==2)) or ((dd==5) and (tlkb==3)) or ((dd==6) and (tlkb==4)) then
no matter which option is chosen in the talk box, the condition in the first parenthesis is always met.
Added after 55 seconds RedHeavenHero
Only the functions I mentioned above can be used here, as well as some others that only work with heroes. GetObjectArmySlotCreature cannot be used.
I understand, so I'll have to do it through other means. Thank you
The first argument in the called function is the player number, and the second is the answer.
Why not use the 'j' variable directly?
You can use a loop instead.
The first argument in the called function is the player number, and the second is the response.
Why go straight to "ж"? You can use a loop.
Aha, that's what it is.... Yes, that makes sense. Everything is clear now, thanks! And where do I get the icon address, and what should it look like? Why isn't the main text displayed in the center of the text box?
Added 22 minutes later RedHeavenHero
Why go straight to "ж"? You can use a loop.
Is this approximately what you mean?
function ubratF() while (ubr==0) do sleep(5); for i=1,14 do local t1=GetHeroCreatures("RedHeavenHero01", i); if (t1>1) then RemoveHeroCreatures("RedHeavenHero01", i, t1/4); end; end; for i=106,112 do local t1=GetHeroCreatures("RedHeavenHero01", i); if (t1>1) then RemoveHeroCreatures("RedHeavenHero01", i, t1/4); end; end; sleep(8); MessageBox(GetMapDataPath().."chuma.txt"); ubr=1; end; sleep(5); end;
The path to the texture should be structured like this. First, the standard path relative to the data folder, but with the slashes reversed, followed by the .xdb extension and then a fragment like #xpointer(/Texture).
Something like this. However, instead of t1/4, it's more reliable to use ceil(t1/4) to avoid errors when the value is less than 4. And I don't quite understand why there's a while loop there.
Instead of an icon, there's a white screen. But that's understandable; I don't know where to find a suitable one. The main text isn't displayed (to the right of the icon). The function doesn't work as it should.
You open the map with an archiver and put the folder from the archive there. Regarding the image, here's an example: '/UI/Tavern/RumorsIcon.(Texture).xdb#xpointer(/Texture)'
If a function is started with startThread, it doesn't necessarily mean that the function must contain a loop.
Yeah, you can manage without a loop here. Thanks!)
Added after 38 seconds Oligarch
You open the map with an archiver and put the folder from the archive there. Regarding the image, here's an example: '/UI/Tavern/RumorsIcon.(Texture).xdb#xpointer(/Texture)'