Nie mam zielonego pojęcia, co i jak to może wywoływać.
Oto tenże urywek kodu(dokładnie to funkcja resources i triggery 800,801,802, reszta jest po to by kod samodzielnie działał)
(nie będę dodawać komentarzy, bo chyba wszystko jest jasne, w przeciwnym razie piszcie)
(kropki są zamiast odstępów, bo quotation je ignoruje)
var dri1, dri2, dri3, cargo1, cargo2, cargo3, sol, al1,al2,al3,al11,al12,al13,al14,al21,al22,al23,al24,al31,al32,al33,al34,al41,al42,al43,al44;
export function resources;
begin
..uc_side:=5;
..uc_nation:=nation_arabian;
..vc_chassis:=ar_half_tracked;
..vc_engine:=engine_combustion;
..vc_control:=control_manual;
..cargo1:=vehicle(ar_cargo_bay);
..SetCargo(cargo1, mat_cans, 100);
..sol:=soldier(1,1,1,1);
..PlaceHumanInUnit(sol,cargo1);
..PlaceUnitArea(cargo1,EnterArea,false);
..ComMoveToArea(cargo1,UnArea);
..AddComUnload(cargo1);
..dri1:=sol;
..cargo2:=vehicle(ar_cargo_bay);
..SetCargo(cargo2, mat_cans, 100);
..sol:=soldier(1,1,1,1);
..PlaceHumanInUnit(sol,cargo2);
..PlaceUnitArea(cargo2,EnterArea,false);
..ComMoveToArea(cargo2,UnArea);
..AddComUnload(cargo2);
..dri2:=sol;
..cargo3:=vehicle(ar_cargo_bay);
..SetCargo(cargo3, mat_oil, 100);
..sol:=soldier(1,1,1,1);
..PlaceHumanInUnit(sol,cargo3);
..PlaceUnitArea(cargo3,EnterArea,false);
..ComMoveToArea(cargo3,UnArea);
..AddComUnload(cargo3);
..dri3:=sol;
..AddComMoveXY(cargo1,39,77);
..AddComMoveXY(cargo2,39,77);
..AddComMoveXY(cargo3,39,77);
..while(GetCargo(cargo1,mat_cans) or GetCargo(cargo2,mat_cans) or GetCargo(cargo3,mat_oil)) do wait(0$0.1);
..SetCargo(cargo1, mat_cans, 10);
..ComMoveXY(cargo1,40,2);
..SetCargo(cargo2, mat_cans, 10);
..ComMoveXY(cargo2,42,2);
..SetCargo(cargo3, mat_cans, 10);
..ComMoveXY(cargo3,44,2);
..enable(800);
..enable(801);
..enable(802);
..al1:=true;
..al2:=true;
..al3:=true;
..while(al1 or al2 or al3) do
..begin
....if al1 then al11:=GetX(cargo1);
....if al2 then al21:=GetX(cargo2);
....if al3 then al31:=GetX(cargo3);
....if al1 then al12:=GetY(cargo1);
....if al2 then al22:=GetY(cargo2);
....if al3 then al32:=GetY(cargo3);
....wait(0$2);
....if al1 then al13:=GetX(cargo1);
....if al2 then al23:=GetX(cargo2);
....if al3 then al33:=GetX(cargo3);
....if al1 then al14:=GetY(cargo1);
....if al2 then al24:=GetY(cargo2);
....if al3 then al34:=GetY(cargo3);
....if al11=al13 and al12=al14 then
....begin
......SetCargo(cargo1, mat_cans, 0);
......al1:=false;
....end;
....if al21=al23 and al22=al24 then
....begin
......SetCargo(cargo2, mat_cans, 0);
......al2:=false;
....end;
....if al31=al33 and al32=al34 then
....begin
......SetCargo(cargo3, mat_cans, 0);
......al3:=false;
....end;
..end;
end;
every 0$0.1 trigger not GetCargo(cargo1,mat_cans) marked 800 do RemoveUnit(cargo1);
every 0$0.1 trigger not GetCargo(cargo2,mat_cans) marked 801 do RemoveUnit(cargo2);
every 0$0.1 trigger not GetCargo(cargo3,mat_cans) marked 802 do RemoveUnit(cargo3);
export function human(classname, sksol, skeng, skmec, sksci);
begin
..hc_name:='';
..hc_skills:=[sksol, skeng, skmec, sksci];
..hc_class:=classname;
..result:=CreateHuman;
end;
export function soldier(sksol, skeng, skmec, sksci);
begin
..result:=human(class_soldier, sksol, skeng, skmec, sksci);
end;
export function engineer(sksol, skeng, skmec, sksci);
begin
..result:=human(class_engineer, sksol, skeng, skmec, sksci);
end;
export function mechanic(sksol, skeng, skmec, sksci);
begin
..result:=human(class_mechanic, sksol, skeng, skmec, sksci);
end;
export function scientist(sksol, skeng, skmec, sksci);
begin
..result:=human(class_scientistic, sksol, skeng, skmec, sksci);
end;
export function vehicle(gun);
begin
..vc_weapon:=gun;
..result:=CreateVehicle;
end;
starting
begin
..wait(0$2);
..resources;
end;
---
ty,
JRF