Skip to content
#3702
Auto-translated
Jewily, thank you, I'll try it now.


Added 27 minutes ago
If we're talking about writing this:

function Quest_Zubec_Handler(player)
  if(player == 1 and GetObjectiveProgress("Quest_Zubec",1) == 3) then
MessageBox ("/Maps/SingleMissions/L1/Parol_Zubec1.txt");
sleep(2);
 end
end
Trigger(OBJECTIVE_STATE_CHANGE_TRIGGER ,"Quest_Zubec_Handler","Quest_Zubec")

And nothing else anywhere, then I only managed to load the map (the quest hasn't been taken yet), and the game already gives me this:

(Script) Error: Objective with name "Quest_Zubec_Handler" is not exists

It seems there's no point in checking? There's a fight that lasts at least half an hour, even with cheats.
I'll try the first option, with the thread.

Added 12 minutes ago
Regarding the first option - the starting video didn't even play because I put that version at the very top.

Here's the script:

function checkState()
  while(1) do
   if(GetObjectiveProgress("Quest_Zubec",player) == 3) then
    MessageBox ("/Maps/SingleMissions/L1/Parol_Zubec1.txt");
    break
   end
   sleep(8) 
  end
  end
  startThread("checkState")

The game says:
(Script) Error: StartTread first parameter must be a function

It seems I'm cursed today). Either the map glitched, and I spent the whole night figuring out how to restore it (I didn't know that the editor could somehow delete files for Map Properties and not allow restoring them, even in earlier versions of the map), or now this...

Added 9 minutes ago
Stop, stop. In the version without a thread, it seems the function and quest names are mixed up.
But if I write

Trigger(OBJECTIVE_STATE_CHANGE_TRIGGER ,"Quest_Zubec","Quest_Zubec_Handler")

take the quest, and immediately use it on SetObjectiveProgress("Quest_Zubec", 3, 1);
then the game doesn't react at all, and doesn't write anything.

Statistics

Welcome our newest member: wayal