Posts from Scripts
TalkBoxForPlayers(PLAYER_1, icon, nil, {text, var1=variable_1, var2=variable_2, var3=variable_3}, nil, nil, 0, title, GetMapDataPath().."ChooseAnswer.txt", 0, GetMapDataPath().."OK.txt");
WITHOUT VARIABLES:
WITH VARIABLES:
If anyone has any ideas on how to fix this and why it's happening, I would be very grateful to hear them.
_________________
Группа картостроителей
Там ответы на вопросы, руководства, гайды и прочее
Discord-сервер "Герои 5: S.T.A.L.K.E.R"
Сервер по модификации "Герои 5: S.T.A.L.K.E.R"
_________________
function fb1()
Trigger(REGION_ENTER_AND_STOP_TRIGGER, "stfb1", "fb1", nil);
RemoveHeroCreatures("RedHeavenHero03", 8, 20);
sleep(1);
RemoveHeroCreatures("Biara", 20, 1*D);
sleep(1);
StartDialogScene("/Maps/SingleMissions/Warprolog/StartScene2/DialogScene.xdb#xpointer(/DialogScene)");
sleep(1);
MoveHeroRealTime("Biara", 88, 59, GROUND);
sleep(1);
end;
Trigger(REGION_ENTER_AND_STOP_TRIGGER, "stfb1", "fb1");
Hello, could you please help me? I'm having a problem with this part of the script.
function fb1()
RemoveHeroCreatures("RedHeavenHero03", 8, 20);
sleep(1);
RemoveHeroCreatures("Biara", 20, 1*D);
sleep(1);
StartDialogScene("/Maps/SingleMissions/Warprolog/StartScene2/DialogScene.xdb#xpointer(/DialogScene)");
sleep(1);
MoveHeroRealTime("Biara", 88, 59, GROUND);
sleep(1);
Trigger(REGION_ENTER_AND_STOP_TRIGGER, "stfb1", "fb1", nil);
end;
Trigger(REGION_ENTER_AND_STOP_TRIGGER, "stfb1", "fb1");
The problem is that after Biara makes her move, this cutscene, StartScene2, plays a second time, specifically within this trigger. There are no other mentions of it. If anyone understands, please tell me what might be the cause. I've been racking my brain over this.
At the very least, the highlighted red section of code is not needed. And it's better to reset the trigger before other operations.
_________________
Группа картостроителей
Там ответы на вопросы, руководства, гайды и прочее
Discord-сервер "Герои 5: S.T.A.L.K.E.R"
Сервер по модификации "Герои 5: S.T.A.L.K.E.R"
_________________
function Sutki()
if GetDate(DAY_OF_WEEK)==1 then
SetAmbientLight(0,"d1",true, 5);
end;
if GetDate(DAY_OF_WEEK)==2 then
SetAmbientLight(0,"d2",true, 5);
end;
if GetDate(DAY_OF_WEEK)==3 then
SetAmbientLight(0,"d3",true, 5);
end;
if GetDate(DAY_OF_WEEK)==4 then
SetAmbientLight(0,"d4",true, 5);
end;
if GetDate(DAY_OF_WEEK)==5 then
SetAmbientLight(0,"d5",true, 5);
end;
if GetDate(DAY_OF_WEEK)==6 then
SetAmbientLight(0,"d6",true, 5);
end;
if GetDate(DAY_OF_WEEK)==7 then
SetAmbientLight(0,"d7",true, 5);
end;
end;
Trigger(NEW_DAY_TRIGGER, "Sutki");
The problem is that the game doesn't react to any of this; the lighting remains the same as on the first day throughout the week. Moreover, the console is silent; there are no error messages, and nothing happens. Initially, I did everything according to the example of a user named Khottabych, who was a few pages above, but then the console complained about an incorrect value for argument 1. After that, I looked at how the developers implemented this in the fifth mission for Arantir. There, I noticed that they had a "0" before the lighting name, so I added it to mine. The console stopped complaining, but it still didn't work. I've tried setting "True" as the developers did, and I've also tried replacing it with "GROUND" as Khottabych suggested, but there's no difference; the console remains silent in both cases. The InternalName of the lighting is specified correctly, and the lighting itself is duplicated in the map files. But it still doesn't work. Please advise on what the problem might be.
_________________
Группа картостроителей
Там ответы на вопросы, руководства, гайды и прочее
Discord-сервер "Герои 5: S.T.A.L.K.E.R"
Сервер по модификации "Герои 5: S.T.A.L.K.E.R"
_________________
Look for the lines SetAmbientLight in the script of my map "Runes in Good Hands," it worked for me.
It's strange, I'm doing it the same way as you, but nothing happens, and the console is still silent. I really don't know what to think :o Even a simple SetAmbientLight outside the trigger doesn't change anything. I'll have to try it on a separate map, maybe I messed something up there). In any case, thank you very much for the advice!
_________________
Группа картостроителей
Там ответы на вопросы, руководства, гайды и прочее
Discord-сервер "Герои 5: S.T.A.L.K.E.R"
Сервер по модификации "Герои 5: S.T.A.L.K.E.R"
_________________
By the way, I forgot to mention: this lighting should be in the Ground/UnderGroundAmbientLights list in the Map Properties Tree. In Runes, the line SetAmbientLight(GROUND, "NecromancyFog", true, 3) worked, so the issue is with the point mentioned above.
It worked! You were right, I added a few more lines to GroundAmbientLight, specified all the desired lighting in them, and now everything works. The FPS drops slightly during the lighting change, but it's worth it; the location really comes alive with all this.
_________________
Группа картостроителей
Там ответы на вопросы, руководства, гайды и прочее
Discord-сервер "Герои 5: S.T.A.L.K.E.R"
Сервер по модификации "Герои 5: S.T.A.L.K.E.R"
_________________
Thank you, I will definitely do that. And another question, could someone share an example of a StartCombat script where the enemies include, for example, a stack of militia and another stack of archers, each with 10 units? I can write a StartCombat for a single type of creature, but I can't figure out how to add a full army of different units; I don't understand which variables to write for the second stack, and it would be easier to understand with a live example. Thank you in advance.
The number of stacks is determined by the third parameter in StartCombat, followed by pairs of [creature ID - number of creatures in the stack]. The number of these pairs corresponds to the number of stacks. Therefore, for the described case, the function would look something like this:
StartCombat('hero_name', nil, 2, CREATURE_MILITIAMAN, 10, CREATURE_ARCHER, 10)
Heroes 5: Битвы кланов - Борьба за ресурсы - Обитель друидов - Падший рыцарь - Побег
Heroes 4: Немеджихра - Приключения ифрита
Heroes 3: Крюлод и Таталия
Heroes 2: Вторжение - Эктор - Сэр Мильтен - Чёртовы Топи
Мой ютуб канал: Navkratis