Я понял, что чего-то не понимаю в работе IsObjectExists.
function P0_check()
while 1 do
if IsObjectExists('T1')==false then
if IsObjectExists('T2')==false then
if IsObjectExists('T3')==false then
if IsObjectExists('T4')==false then
sleep(5)
if (not GetObjectiveState('P0')==OBJECTIVE_COMPLETED) then
startThread( P0_change_state );
break;
end;
end;
end;
end;
end;
sleep(1);
end;
end;
Все четыре города (T1, T2, T3, T4) на карте присутствуют.
Тред радостно проходится по всем if'ам и запускает новую функцию, хотя и не должен. Как так?