Why does the hero disappear from the map and the quest is marked as completed after using the SetObjectEventState command, which is supposed to trigger the quest to kill a hero?
Posts from Current questions and answers regarding the map editor.
Auto-translated
Here is
Attachment 66218
function Brem_Defeat(hero)
if hero=="Brem" then
SetObjectiveState("task name", OBJECTIVE_COMPLETED)
Trigger(PLAYER_REMOVE_HERO_TRIGGER, player number, nil)
print("123")
end
end
Trigger(PLAYER_REMOVE_HERO_TRIGGER, player number, "Brem_Defeat")
Again, there may be errors here
Hello everyone, can you tell me if it's possible to add more than a thousand warriors to each cell in the garrison within the map editor? I wanted to add 3000 warriors, but it only shows 999.
Кампании: "Новый порядок", "Серый Альянс", "Поиски Истины"
Трейлер №2 кампании "Дыхание Пустоты": https://www.youtube.com/watch?v=XkHKXk5BctA&ab_channel=%D0%90ndrei_21
Here is
Attachment 66218
You can do this either through the script command AddObjectCreatures, or by clicking on the garrison, finding the ArmySlots parameter in the left window of the editor, right-clicking on it, in the pop-up window, clicking Add, then clicking on the plus sign that appears next to it, selecting the parameter from the list, and in the Creature field, specify CREATURE_STOUT_DEFENDER (this is the ID for the Warriors), and in the Count field, specify the desired number.
Here's
Attachment 66218
I understand... So, show me the function that starts this quest.
while 1 do
sleep(10);
if GetHeroCreatures(hero, id)==0 then
SetObjectiveState("zadanie4", OBJECTIVE_FAILED)
sleep(10);
Loose();
break
end;
end;
end;
function StartScene()
StartDialogScene('/MyScene/StartScene/DialogScene1/DialogScene.xdb#xpointer(/DialogScene)')
Trigger(REGION_ENTER_AND_STOP_TRIGGER, "reg12", nil);
for i=1,4 do
SetObjectiveState("zadanie"..i, OBJECTIVE_ACTIVE)
end
startThread(CreatureShouldSurvive, 'Mardigo', CREATURE_CLERIC)
AddHeroCreatures("Mardigo", 1, 40);
AddHeroCreatures("Mardigo", 5, 10);
AddHeroCreatures("Mardigo", 10, 1);
for i=500,508 do
RemoveObject(i)
end
end
Trigger(REGION_ENTER_AND_STOP_TRIGGER, "reg12", "StartScene");
Here.
function CreatureShouldSurvive(hero, id)
while 1 do
sleep(10);
if GetHeroCreatures(hero, id)==0 then
SetObjectiveState("zadanie4", OBJECTIVE_FAILED)
sleep(10);
Loose();
break
end;
end;
end;
function StartScene()
StartDialogScene('/MyScene/StartScene/DialogScene1/DialogScene.xdb#xpointer(/DialogScene)')
Trigger(REGION_ENTER_AND_STOP_TRIGGER, "reg12", nil);
for i=1,4 do
SetObjectiveState("zadanie"..i, OBJECTIVE_ACTIVE)
end
startThread(CreatureShouldSurvive, 'Mardigo', CREATURE_CLERIC)
AddHeroCreatures("Mardigo", 1, 40);
AddHeroCreatures("Mardigo", 5, 10);
AddHeroCreatures("Mardigo", 10, 1);
for i=500,508 do
RemoveObject(i)
end
end
Trigger(REGION_ENTER_AND_STOP_TRIGGER, "reg12", "StartScene");
Here
_________________
Группа картостроителей
Там ответы на вопросы, руководства, гайды и прочее
Discord-сервер "Герои 5: S.T.A.L.K.E.R"
Сервер по модификации "Герои 5: S.T.A.L.K.E.R"
_________________
_________________
Группа картостроителей
Там ответы на вопросы, руководства, гайды и прочее
Discord-сервер "Герои 5: S.T.A.L.K.E.R"
Сервер по модификации "Герои 5: S.T.A.L.K.E.R"
_________________
Grigory Kovalev, startThread accepts any number of parameters.
Alinksolo, it’s likely that one of your 4 quests has the InstantVictory = true setting, and at the same time, it doesn’t have refined conditions, as if, in the case of the quest to kill the hero Brem, Brem was missing or didn’t appear before the quest was issued (this quest is configured correctly for you; I’m just giving an example of a possible flaw in the quest conditions). Thus, after the assignment is issued, the scenario ends with the player’s victory. The removal of heroes occurs due to the player’s victory. Check if all your quests have InstantVictory = false?