Skip to content

Posts from Scripts

4.8 (8 ratings)
User Avatar
10 years ago
Auto-translated
Which scripts affect the behavior of enemy heroes? For example, I want one hero to always stay in the town, and the other to immediately attack my hero upon appearing. Which function is responsible for this?
User Avatar
10 years ago
Auto-translated
Hypothetically, it's determined by the behavior model of a particular AI player, and there's a setting for it (I think, in "players"). In practice, however, nothing seems to work there. So, I don't know what to suggest.
User Avatar
10 years ago
Auto-translated
Where can I find these player settings? I either can’t see them, or I’m just missing something.
User Avatar
10 years ago
Auto-translated
In MapPropertiesTree. But I repeat, based on my observations, this doesn't work.
User Avatar
10 years ago
Auto-translated
Well, I don't really have a choice anyway)

Added 1 hour 12 minutes ago
So, I just placed the region in front of the castle and blocked it for that player in the script. And which function is responsible for the quest appearing in the journal on a specific day? I mean, so that it (the quest) doesn't appear immediately.
User Avatar
10 years ago
Auto-translated
Trigger(NEW_DAY_TRIGGER, ....
You'll figure it out there. You need to set a condition to check the day, week, month, and so on...
User Avatar
10 years ago
Auto-translated
Help again. I want the text to be displayed and the enemy hero to be teleported to a point after one and a half months. What's wrong?
function pokushenie()
(paragraph)if GetDate(DAY) == 42 then
(paragraph)(paragraph)MessageBox("Maps/SingleMissions/Five Plunderers/podzhigatel.txt", TeleporateHero);

function TeleporateHero()
SetObjectPosition("Biara", 31, 129, 0);
end;
User Avatar
10 years ago
Auto-translated
end is needed after the function body if (before function TeleporateHero()
SetObjectPosition("Biara", 31, 129, 0);
end; )
User Avatar
10 years ago
Auto-translated
Doesn't help.
User Avatar
10 years ago
Auto-translated
function pokushenie()
(paragraph)if GetDate(DAY) == 42 then
(paragraph)(paragraph)MessageBox("Maps/SingleMissions/Five Plunderers/podzhigatel.txt", TeleporateHero);
end;
end;

function TeleporateHero()
SetObjectPosition("Biara", 31, 129, 0);
end;

How about this?
User Avatar
10 years ago
Auto-translated
No way.
User Avatar
10 years ago
Auto-translated
Well, um, then I recommend using the console. I don't see any more obvious errors.
User Avatar
10 years ago
Auto-translated
My console isn't working. No matter how much I try to fix it, it's all in vain.
User Avatar
10 years ago
Auto-translated
Oh, I'm still lagging behind.
function pokushenie()
Is this all? There's no loop, no startThread? That's wrong; you need to run this function, not just declare it. And an infinite loop is needed. function pokushenie() while 1 do if GetDate(DAY) == 42 then MessageBox("Maps/SingleMissions/Five Plunderers/podzhigatel.txt", TeleporateHero); break; end; sleep(2); end; end; function TeleporateHero() SetObjectPosition("Biara", 31, 129, 0); end;
10 years ago
Auto-translated
Hello everyone! I apologize for going slightly off-topic, but I have a vague feeling that the problem lies in the scripts. Here's the issue: in the first mission of Frida's campaign in the All-in-one mod, when you take the quest from the seer, kill the druids, and return to him, nothing happens. Specifically, the "end search" button doesn't appear, the quest isn't completed, and the ambushes remain until the end of the mission. I'd like to know if anyone else has encountered a similar problem. Version 3.1.

Statistics

Welcome our newest member: recijeb