Hey guys, I have a question. Can you tell me what's wrong?
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.This command doesn't work. Nothing happens after the town is captured. There are no errors. Where could I have made a mistake? Thanks in advance.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)
I don't quite understand why there's a "1" in "SetObjectiveState('q4', OBJECTIVE_FAILED, 1);" and why the trigger is removed afterward.