If computer-controlled heroes are running around, then check once a day or in a separate thread (using the startThread function).
Now, another funny problem has arisen.
It's a simple task:
- Enter a region, receive a quest to find an artifact, and complete the previous quest.
- Pick up the artifact, and the quest is completed.
I created an inactive quest, which is not initially displayed, to find artifacts. Then I simply activate it.
Trigger(REGION_ENTER_AND_STOP_TRIGGER, "quest1end", "quest1end_quest2start");
function quest1end_quest2start()
SetObjectiveState("quest1info", OBJECTIVE_COMPLETED, PLAYER_1);
MsgBox('quest1end');
sleep('5');
MsgBox('quest2start');
SetObjectiveState("artifact1", OBJECTIVE_ACTIVE, PLAYER_1);
Trigger(REGION_ENTER_AND_STOP_TRIGGER, "quest1end", nil);
end;It seems like everything is fine, but after we pick up the artifact, the mission is immediately won. What's the problem? Is it the lack of other quests, or did I mess something up in the map properties?