Spoiler:
Code: Select all
If poj=4 then
Nie mam juz głowy co może być nie tak.
Z góry wielkie dzięki.
Code: Select all
If poj=4 then
Randy Orton wrote:Ostatni pojazd który wyjechał z fabryki pojechał na atak. pozostałe stoja i nic nie robią.
Code: Select all
If pojazdy >= 4 then // warunek zostanie spełniony gdy zbiór pojazdy będzie większy lub równy 4
begin
wait(0$10);
AddComAgressiveMove(poj,108,112); // i tu masz błąd, bo wysyłasz aktualny poj czyli poj = 4 do ataku
enable;// enable nie jest tu potrzebne
Code: Select all
Export Function SendAttack(at_units);
var i;
For i = 1 to at_units do
begin
AddComAgressiveMove(at_units[i],108,112);
end;
End;
// event powinnien wyglądać tak:
On VehicleConstructed(poj,fab) do
begin
enable(120);
If fab=fabr then
begin
pojazdy=pojazdy^[poj];
linkvehicletohuman(poj,wieza2);
AddComMoveToArea(poj,parking);
If pojazdy >= 3 {lub 4} then
begin
SendTroops(pojazdy); // używa funkcji tej wyżej, a nawias mówi grze co to at_units
disable(90);
end;
End;
end;