Skip to content

Posts from Scripts

4.8 (8 ratings)
In reply to }{0TT@6bI4
User Avatar
Auto-translated
}{0TT@6bI4
Good luck
Thanks, if we could just solve that issue with the city, we could start working on a test playthrough.
Мои карты для:
Heroes 5: Битвы кланов - Борьба за ресурсы - Обитель друидов - Падший рыцарь - Побег
Heroes 4: Немеджихра - Приключения ифрита
Heroes 3: Крюлод и Таталия
Heroes 2: Вторжение - Эктор - Сэр Мильтен - Чёртовы Топи
Мой ютуб канал: Navkratis
User Avatar
Auto-translated
I think it's already been resolved. Change laDitana to Town (and in the script as well).
С уважением, }{0TT@6bI4
_________________
Группа картостроителей
Там ответы на вопросы, руководства, гайды и прочее
Discord-сервер "Герои 5: S.T.A.L.K.E.R"
Сервер по модификации "Герои 5: S.T.A.L.K.E.R"
_________________
In reply to }{0TT@6bI4
User Avatar
Auto-translated
}{0TT@6bI4
In my opinion, it's already solved. Change laDitana to Town (and in the script as well).
I changed it in both places to just ditana; the quest appeared, but nothing happened when I completed it. I'll try one more time now.
Мои карты для:
Heroes 5: Битвы кланов - Борьба за ресурсы - Обитель друидов - Падший рыцарь - Побег
Heroes 4: Немеджихра - Приключения ифрита
Heroes 3: Крюлод и Таталия
Heroes 2: Вторжение - Эктор - Сэр Мильтен - Чёртовы Топи
Мой ютуб канал: Navkratis
In reply to }{0TT@6bI4
User Avatar
Auto-translated
The task of capturing this city should have been completed, and the main hero would have received the "Berserk" spell. I checked again, but it still doesn't work.

Added 17 minutes later
I replaced the name with "ditana" again; otherwise, when searching for a town by name within the map, every city would be displayed.

Added 21 hours and 26 minutes later
I managed to make the script execute in the following way:

function necropolis()
while 1 do
if GetObjectOwner("ditana")==PLAYER_1 then
SetObjectiveState("zadanie4", OBJECTIVE_COMPLETED, 1);
TeachHeroSpell("Brem", 18);
* * break
* end;
sleep (2);
end;
end;

if GetDate(DAY)==5 then
MessageBox(path.."day5.txt");
SetObjectiveState("zadanie4", OBJECTIVE_ACTIVE, 1);
startThread(necropolis)
end;

However, I still don't understand why it wouldn't execute normally.
Мои карты для:
Heroes 5: Битвы кланов - Борьба за ресурсы - Обитель друидов - Падший рыцарь - Побег
Heroes 4: Немеджихра - Приключения ифрита
Heroes 3: Крюлод и Таталия
Heroes 2: Вторжение - Эктор - Сэр Мильтен - Чёртовы Топи
Мой ютуб канал: Navkratis
Auto-translated
Hey, is there a command or trigger that, when I see a certain object (doesn't matter what distance), performs a specific function?
User Avatar
Auto-translated
IsObjectVisible(player_id, object_name) – try it.
Нет войне.
In reply to Gerter
Auto-translated
Gerter
Try using IsObjectVisible(id_player, object_name)
Understood, acknowledged, thank you.
User Avatar
Auto-translated
How can I make it so that a monster or other object on the map displays different text messages? Something like a random selection?
User Avatar
Auto-translated
Some variable (R) should be assigned a random value (random(n)+1, where n is the number of message options). Additionally, an array called messages is needed, containing n elements – paths to different messages. In the message box, instead of the path to the text, a simple construction like messages[R] should be used.
С уважением, }{0TT@6bI4
_________________
Группа картостроителей
Там ответы на вопросы, руководства, гайды и прочее
Discord-сервер "Герои 5: S.T.A.L.K.E.R"
Сервер по модификации "Герои 5: S.T.A.L.K.E.R"
_________________
User Avatar
Auto-translated
Good afternoon, please tell me how I can implement the following idea using a script: There are 2 secondary quests (SO-1), to capture a neutral city and it is initially stated in the tasks, and (SO-2), to control the surrounding mines, which is a hidden quest. The goal is to make quest SO-2 visible immediately after capturing the neutral city. I tried to do something similar, but it turned out to be not very good, and is it possible to get a tutorial on this problem?
function detencion()
if GetObjectOwner("Dwarftown")==PLAYER_1 then
SetObjectiveVisible("SO-2", bVisible, "nPlayerID = 1")
Trigger(OBJECT_CAPTURE_TRIGGER,"Dwarftown1", "detencion")
end
end
Trigger(OBJECT_CAPTURE_TRIGGER, "Dwarftown1", nil)
In reply to Vladislav A-V
User Avatar
Auto-translated
Vladislav A-V
Good afternoon, please tell me how I can implement the following idea using a script: There are 2 secondary quests (SO-1), to capture a neutral city and it is initially included in the tasks, and (SO-2), to control the surrounding mines, which is a hidden quest. The goal is to make quest SO-2 visible immediately after capturing the neutral city. I tried to do something similar, but it turned out to be not very clear, and is it possible to get a tutorial on this problem?
function detencion()
if GetObjectOwner("Dwarftown")==PLAYER_1 then
SetObjectiveVisible("SO-2", bVisible, "nPlayerID = 1")
Trigger(OBJECT_CAPTURE_TRIGGER,"Dwarftown1", "detencion")
end
end
Trigger(OBJECT_CAPTURE_TRIGGER, "Dwarftown1", nil)

Because the second parameter of the SetObjectiveVisible function is nil or not nil (false or true), and not the variable bVisible. And if you are using Novik's Manual, then look at the lowercase letters before the parameters; 'b' means boolean.

To make it visible, set the second parameter to true (not nil).
С уважением, }{0TT@6bI4
_________________
Группа картостроителей
Там ответы на вопросы, руководства, гайды и прочее
Discord-сервер "Герои 5: S.T.A.L.K.E.R"
Сервер по модификации "Герои 5: S.T.A.L.K.E.R"
_________________
User Avatar
Auto-translated
Thank you for the correction; the script seems to be working correctly now, but there are no errors in the console, and the task is still not displayed. It seems the error lies in something else.
User Avatar
Auto-translated
Could you provide a screenshot of the task properties? By the way, using only SetObjectiveVisible might not be enough; it's better to use SetObjectiveActive; this will automatically make the task visible.

I'll sketch out a script on the test platform for now.
С уважением, }{0TT@6bI4
_________________
Группа картостроителей
Там ответы на вопросы, руководства, гайды и прочее
Discord-сервер "Герои 5: S.T.A.L.K.E.R"
Сервер по модификации "Герои 5: S.T.A.L.K.E.R"
_________________

Statistics

Welcome our newest member: Emil