Can someone explain to me how to use the SetObjectiveState script? Many people suggested using it when I asked how to create an object that gives a quest.
Ideally, with examples, because I won't understand much without them.
In simple terms, the script activates a quest, completes/fails it.
SetObjectiveState("prim1", OBJECTIVE_ACTIVE) -- the first parameter is the quest name, the second is the status.
function PRIM3_COMPL()
Trigger(REGION_ENTER_AND_STOP_TRIGGER, '4', nil)
if GetCurrentPlayer()==1 then
SetObjectiveState("prim3", OBJECTIVE_COMPLETED) -- the same, but with a different quest status.
print("32")
end
end
Trigger(REGION_ENTER_AND_STOP_TRIGGER, '4', 'PRIM3_COMPL')