Skip to content

Posts from How do I specify in the quest which artifact needs to be obtained? Auto-translated

No ratings yet — be the first to rate!
User Avatar
#1
Auto-translated
I tried adding the artifact's ID (DRAGON_SCALE_SHIELD) to the parameter string, as well as its name as it appears in the game files (DragonscaleShield), and its Shared value. I also tried assigning it a name in the Name string to use it, but none of this works. I copied everything, and I couldn't have made any mistakes in the characters. The quest still doesn't complete when the artifact is obtained.
User Avatar
#2
Auto-translated
Set KIND_MANUAL, and write the following in the script:
function artifact_objective()
while 1 do
if HasArtefact("Script name of the hero") then
SetObjectiveState("Script name of the quest", OBJECTIVE_COMPLETED);
break
end;
sleep(2)
end;
end;

startThread(artifact_objective)
It's easier to write this in the script than to mess around with setting up quests in the editor.
С уважением, }{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
#3
Auto-translated
}{0TT@6bI4
Set KIND_MANUAL, and write the following in the script:
function artifact for OSH_objective()
while 1 do
* if HasArtefact("Script name of the hero") then
* * SetObjectiveState("Script name of the quest", OBJECTIVE_COMPLETED);
* * break
* end;
sleep(2)
end;
end;

startThread(artifact_objective)
It's easier to write this in the script than to mess around with setting up quests in the editor.
Thank you very much. And in the quest itself, what should I specify: Shared artifact or its ID?
In reply to Callum
User Avatar
#4
Auto-translated
Callum
Thank you very much. And what should be specified in the task itself: the shared artifact or its ID?
You're welcome. The task will be executed by a script.
С уважением, }{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
#5
Auto-translated
It might be a silly question, but I can't figure out where to put this script. It seems like you can't write a script directly into the artifact itself.
In reply to Ment
User Avatar
#7
Auto-translated
In the HasArtefact function, is it necessary to specify the artifact ID as the second argument? I specified it without quotes, and the console displays an error in the second argument.

UPDATE: Thanks to everyone, I figured it out.