Auto-translated
Okay, now I think I messed something up completely. The game freezes after I close the "2" message.
MessageBox(GetMapDataPath()..'1.txt');
MessageBox(GetMapDataPath()..'2.txt');
Trigger(REGION_ENTER_AND_STOP_TRIGGER, 'Svetlana_Vyacheslav1', 'talk1');
Trigger(REGION_ENTER_AND_STOP_TRIGGER, 'demons', 'talk2');
function talk1 ()
MessageBox(GetMapDataPath()..'3.txt')
Trigger(REGION_ENTER_AND_STOP_TRIGGER, 'Svetlana_Vyacheslav1', nil);
end
function talk2 ()
MessageBox(GetMapDataPath()..'4.txt');
Trigger(REGION_ENTER_AND_STOP_TRIGGER, 'demons', nil);
end
function task1()
while GetObjectiveState('meet_demons', PLAYER_1) == OBJECTIVE_ACTIVE do
sleep(5)
end
SetObjectiveState('hero_from_hell', OBJECTIVE_ACTIVE, PLAYER_1);
MessageBox(GetMapDataPath()..'5.txt');
end;
function task2()
while 1 do
if GetObjectiveState('kill_daeva', PLAYER_1)== OBJECTIVE_COMPLETED
and
GetObjectiveState('capture_mines', PLAYER_1) == OBJECTIVE_COMLETED
then
sleep(5)
SetObjectiveState('hero_from_hell',OBJECTIVE_COMPLETED, PLAYER_1)
SetObjectiveState('go_throw_dungeon',OBJECTIVE_ACTIVE, PLAYER_1)
end
end
end;
startThread(task1);
startThread(task2) ;
Added 14 minutes ago
And yes, I didn't quite understand where exactly I need to put the `sleep` and what value should be in the parentheses. :smile35: