The situation: there's an elven town belonging to an elf (Player 3). If Player 2 captures it, the quest fails, and the game is lost.
function CheckAnpossal()
while 1 do
sleep(5)
if GetObjectOwner ('houseElf') == PLAYER_2 then
sleep(10)
SetObjectiveState('q4', OBJECTIVE_FAILED, 1);
sleep(10)
Loose ();
Trigger(OBJECT_CAPTURE_TRIGGER, 'houseElf', nil)
break
end
end
end
startThread (CheckAnpossal)
This command isn't working. After the town is captured, nothing happens. There are no errors. Where could I have made a mistake? Thanks in advance.