Polski Česky English Français Русский Español
Home Site Original War Support Community Forums Facebook YouTube Discord
Your first time here? View this!
» Index > Modding Archive > SAIL - Poziom trudności: ilość jednostek

SAIL - Poziom trudności: ilość jednostek

NNPlaya pisze:Wiesz, zrobiłem coś w podobie, tylko i wyłącznie w SAILu.

Kod:

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;

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:

Kod:

export liczba_ludzi, soldat1, soldat2, soldat3; 

Starting 
Begin 
trudnosc; 
end;

Kod:

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;

Author: NNPlaya
Topic: https://forum.original-war.net/viewtopic.php?t=508

» Index > Modding Archive > SAIL - Poziom trudności: ilość jednostek