Skip to content
#262
Auto-translated
Winner
Could you please explain in a bit more detail? :o

I replaced "~1" with "2," but nothing happens. Then, I tried this: when capturing one city, it checks if the second city has also been captured. Now, when capturing two cities, the game crashes :D. I also don't understand that quest... I guess I'll have to redo it.
So, here's how I'm running the loop: (I also have a check here to see if a monster is on the map; if not, the mission fails).

while 1 do
if atonce_5==1 then
startThread (lost_PL4);
if IsObjectExists('Lelliana')==nil then
SetObjectiveState ('obj_7',OBJECTIVE_FAILED);
startThread(gameover);
end;
end;
sleep (5);
end;

This function checks the state of player 4; i.e., here, if PL_4 is not participating in the game, then the 'obj_7' objective is completed.
function lost_PL4()
if GetPlayerState(PLAYER_4)~=1 then
atonce_5=99;
SetObjectiveState ('obj_7',OBJECTIVE_COMPLETED);
end;
end;

And when the objective is activated, you need to assign
atonce_5=1; and after the objective is completed, atonce_5=99; so that the loop doesn't slow down the game.
Try creating a new objective in the Objectives tab without changing the parameters (just set the name, description, and OBJECTIVE_KIND_MANUAL), and check how it behaves when completed (will the mission be won immediately, without completing other objectives?)

Statistics

Welcome our newest member: dodoD0D0