Okay I have my DTM's setup like this:
SCAR Code:
procedure LoadDTMs;
begin
SetArrayLength(DTMarray, 6);
DTMarray[0] := DTMFromString('78DA63CC6166602860644006C9DE3A0CFC401' + // Tree Logs
'A24FA1F0818AB816ACA51D530303081499828633C504D0D013525' +
'4035E904D42402D5E4E0570300B3DE095D');
DTMarray[1] := DTMFromString('78DA639CCECCC050C0C8800C3AD26D19F8813' + // Oak Logs
'448F43F1030CE03AA494755C3C0C0042661A28C3D40353504D4CC' +
'07AAA922A0A61BA82607BF1A0039500A82');
DTMarray[2] := DTMFromString('78DA633CC0CCC050C0C8800C5C6DC518F8813' + // Willow Logs
'448F43F10309E00AA494755C3C0C0042661A28CDB806A6A08A839' +
'055453458439D9F8D5000034A60AC0');
DTMarray[3] := DTMFromString('78DA637CCDCCC090C7C8800C626C7919F8813' + // Maple Logs
'448F43F10307E02AA494755C3C0C0042661A28C0F816A6A09A8F9' +
'0C54534540CD03A09A6CFC6A00951E0BA0');
DTMarray[4] := DTMFromString('78DA63CC61666098C2C8800CFC2CB919F8813' + // Yew Logs
'44C94B104A8A61B550D030313440EA62606A86636013555403573' +
'08A84902AAE9C7AF06007E0E05C5');
DTMarray[5] := DTMFromString('78DA639CCCCCC0308591011934548431F0036' + // Magic Logs
'990E87F20605C0454B300550D03031398848932CE03AAE921A0A6' +
'830873BA816A26E25703009B4E0B57');
end;
procedure FreeDTMs;
var
I: Integer;
begin
for I := 0 to High(DTMarray) do
FreeDTM(DTMarray[I]);
end;
and I have my function for when I run out of logs:
SCAR Code:
function OutOfLogs: Boolean;
var
x, y: Integer;
begin
GameTab(Tab_Inv);
Result := not(FindDtm(DTMarray, x, y, MIX1, MIY1, MIX2, MIY2));
end;
Now what I do not understand since EvilChicken told me to set my DTM's in array I do not know how to setup my function anymore.
SCAR Code:
Result := not(FindDtm(DTMarray, x, y, MIX1, MIY1, MIX2, MIY2));
I do not know what to do for that? There are alot of DTM's with the names DTMarray, how do I make it use all of them?