Author: NNPlayaNNPlaya wrote:Wiesz, zrobiłem coś w podobie, tylko i wyłącznie w SAILu.Ten kod służy do tworzenia beczek z paliwem w ilości zależnie od poziomu trudności. Dla ludzi wyglądałoby to mniej więcej tak:Code: Select all
function prepare_difficulty; Begin oilcans=[3,2,1][Difficulty]; If oilcans=1 then Begin CreateResourcesXY(mat_oil, 5, 58, 51, false);CreateResourcesXY(mat_oil, 5, 62, 59, false); end; If oilcans=2 then Begin CreateResourcesXY(mat_oil, 5, 58, 51, false); CreateResourcesXY(mat_oil, 5, 59, 51, false); CreateResourcesXY(mat_oil, 5, 62, 59, false); CreateResourcesXY(mat_oil, 5, 62, 60, false); end; If oilcans=3 then Begin CreateResourcesXY(mat_oil, 5, 58, 51, false); CreateResourcesXY(mat_oil, 5, 59, 51, false); CreateResourcesXY(mat_oil, 5, 57, 50, false); CreateResourcesXY(mat_oil, 5, 62, 59, false); CreateResourcesXY(mat_oil, 5, 62, 60, false); CreateResourcesXY(mat_oil, 5, 62, 61, false); end; end;
Code: Select all
export liczba_ludzi, soldat1, soldat2, soldat3; Starting Begin trudnosc; end;
Code: Select all
function trudnosc; liczba_ludzi=[1,2,3][Difficulty]; If liczba_ludzi=1 then Begin uc_side=3; uc_nation=3; hc_skills=[3, 1, 2, 0]; hc_class=class_soldier; soldat1=CreateHuman; PlaceUnitArea(soldat1,jakaś_area,false); end; If liczba ludzi=2 then Begin uc_side=3; uc_nation=3; hc_skills=[3, 1, 2, 0]; hc_class=class_soldier; soldat1=CreateHuman; soldat2=CreateHuman; PlaceUnitArea(soldat1,jakaś_area,false); PlaceUnitArea(soldat2,jakaś_area,false); end; If liczba_ludzi=3 then Begin uc_side=3; uc_nation=3; hc_skills=[3, 1, 2, 0]; hc_class=class_soldier; soldat1=CreateHuman; soldat2=CreateHuman; soldat3=CreateHuman; PlaceUnitArea(soldat1,jakaś_area,false); PlaceUnitArea(soldat2,jakaś_area,false); PlaceUnitArea(soldat3,jakaś_area,false); end;
Topic: http://forum.original-war.net/viewtopic.php?t=508