Yes, you need to call it like this: @DoFile(MYFILE);
Added 9 minutes later
It's simple: use SetAIHeroAttractor(nHero, nTown, 2); at the appropriate moment.
Then, create a handler for when the town is touched, checking who touched it:
function example(heroname)
if heroname=="MYAIHERONAME" then
SiegeTown(...)
...
end;
end;In theory, the AI hero will enter the town on its own. But you can use a workaround, like hiring a hero in that town. In general, too many workarounds are not ideal, but Lua's functionality is limited, so we have to improvise. I'll think more thoroughly about your problem and look at it on my computer tomorrow; right now, I can barely remember anything on my smartphone.P.S. I can still answer simpler questions.
_________________
Группа картостроителей
Там ответы на вопросы, руководства, гайды и прочее
Discord-сервер "Герои 5: S.T.A.L.K.E.R"
Сервер по модификации "Герои 5: S.T.A.L.K.E.R"
_________________