rj
2013-04-21 18:59:07
@superuser
Does anyone know how to use 2 objects using his [http://villavu.com/forum/showthread.php?t=100227] include? I have
But that does not seem to work
Does anyone know how to use 2 objects using his [http://villavu.com/forum/showthread.php?t=100227] include? I have
procedure InitRocks();
begin
SMART_ClearMS();
with surface_rock do begin
c := 1070711;
hm := 0.02;
sm := 0.19;
t := 6;
minw := 4; // At least 4 pixels wide.
maxw := 80; // No more than 80 pixels wide.
minh := 4; // At least 4 pixels tall.
maxh := 80; // No more than 80 pixel tall.
step := 9;
max_distance := 200;
end;
CreateSurfaceParts(obj_coal_rock, 2);
with obj_coal_rock do begin
// So, the first part we copy:
parts[0] := CopySurfacePart(surface_rock);
// And then the second one, which is the brown part in iron rock when it's not mined yet.
parts[1].c := 1251873;
parts[1].hm := 1.39;
parts[1].sm := 4.49;
parts[1].t := 6;
parts[1].filter := @SurfaceFilterClosest; // We want to have the closest iron rock next to us.
parts[1].minw := 5;
parts[1].maxw := parts[0].maxw;
parts[1].minh := 5;
parts[1].maxh := parts[0].maxh;
parts[1].step := 16;
parts[1].max_distance := parts[0].max_distance;
name := 'Coal ore';
uptext := 'Coal';
filter := @SurfaceFilterClosest;
end;
with surface_bank do begin
c := 6713206;
hm := 0.29;
sm := 0.08;
t := 5;
minw := 4; // At least 4 pixels wide.
maxw := 40; // No more than 80 pixels wide.
minh := 4; // At least 4 pixels tall.
maxh := 100; // No more than 80 pixel tall.
step := 9;
max_distance := 250;
end;
CreateSurfaceParts(obj_Deposite, 2);
with obj_deposite do begin
// So, the first part we copy:
parts[1] := CopySurfacePart(surface_bank);
// And then the second one, which is the brown part in iron rock when it's not mined yet.
parts[1].c := 6653336;
parts[1].hm := 0.11;
parts[1].sm := 0.39;
parts[1].t := 3;
parts[1].filter := @SurfaceFilterClosest; // We want to have the closest iron rock next to us.
parts[1].minw := 5;
parts[1].maxw := parts[1].maxw;
parts[1].minh := 5;
parts[1].maxh := parts[1].maxh;
parts[1].step := 16;
parts[1].max_distance := parts[1].max_distance;
name := 'Deposite booth';
uptext := 'deposite';
filter := @SurfaceFilterClosest;
end;
end;But that does not seem to work