I know that this topic is old, but I would just like to clarify that you do have to recompile the DDTM for it to work, I was wrong before. YoHoJo's tut is a little misleading.
This is what I did:
I call this procedure at script startup, these are the DDTM values that don't change.
procedure SetupClayFarmer;
begin
//Walking DDTM's
FFMP.x := 654;
FFMP.y := 115;
FFMP.AreaSize := 0;
FFMP.AreaShape := 0;
FFMP.Tolerance := 0;
FFSP[0].x := 647;
FFSP[0].y := 95;
FFSP[0].AreaSize := 2;
FFSP[0].AreaShape := 0;
FFSP[0].Tolerance := 0;
FFSP[1].x := 635;
FFSP[1].y := 84;
FFSP[1].AreaSize := 2;
FFSP[1].AreaShape := 0;
FFSP[1].Tolerance := 0;
FFSP[2].x := 617;
FFSP[2].y := 122;
FFSP[2].AreaSize := 2;
FFSP[2].AreaShape := 0;
FFSP[2].Tolerance := 0;
FFSP[3].x := 632;
FFSP[3].y := 117;
FFSP[3].AreaSize := 2;
FFSP[3].AreaShape := 0;
FFSP[3].Tolerance := 0;
FFSP[4].x := 676;
FFSP[4].y := 122;
FFSP[4].AreaSize := 2;
FFSP[4].AreaShape := 0;
FFSP[4].Tolerance := 10;
FFSP[5].x := 683;
FFSP[5].y := 126;
FFSP[5].AreaSize := 2;
FFSP[5].AreaShape := 0;
FFSP[5].Color := MMRoadCol;
FFSP[5].Tolerance := 10;
FMMP.x := 622;
FMMP.y := 83;
FMMP.AreaSize := 0;
FMMP.AreaShape := 0;
FMMP.Tolerance := 0;
FMSP[0].x := 607;
FMSP[0].y := 75;
FMSP[0].AreaSize := 2;
FMSP[0].AreaShape := 0;
FMSP[0].Tolerance := 0;
FMSP[1].x := 599;
FMSP[1].y := 60;
FMSP[1].AreaSize := 2;
FMSP[1].AreaShape := 0;
FMSP[1].Tolerance := 0;
FMSP[2].x := 612;
FMSP[2].y := 94;
FMSP[2].AreaSize := 2;
FMSP[2].AreaShape := 0;
FMSP[2].Tolerance := 0;
FMSP[3].x := 606;
FMSP[3].y := 101;
FMSP[3].AreaSize := 2;
FMSP[3].AreaShape := 0;
FMSP[3].Tolerance := 0;
FMSP[4].x := 640;
FMSP[4].y := 84;
FMSP[4].AreaSize := 2;
FMSP[4].AreaShape := 0;
FMSP[4].Tolerance := 0;
FMSP[5].x := 656;
FMSP[5].y := 79;
FMSP[5].AreaSize := 2;
FMSP[5].AreaShape := 0;
FMSP[5].Tolerance := 0;
end;
Then I have procedures like the ones below. MMRoadCol is a variable that is changing to the color of the road throughout the script.
function MakeFFDDTM : Integer;
var
FFSkel : TDTM;
i : integer;
begin
FFMP.Color := MMRoadCol;
for i := 0 to 5 do FFSP[i].Color := MMRoadCol;
FFSkel.MainPoint := FFMP;
FFSkel.SubPoints := FFSP;
Result := AddDTM(FFSkel);
end;
function MakeFMDDTM : Integer;
var
FMSkel : TDTM;
i : integer;
begin
FMMP.Color := MMRoadCol;
for i := 0 to 5 do FMSP[i].Color := MMRoadCol;
FMSkel.MainPoint := FMMP;
FMSkel.SubPoints := FMSP;
Result := AddDTM(FMSkel);
end;
Now, when I want to search for one of these DDTMs, I do this.
DTMRotated(MakeFFDDTM, x, y, MMX1, MMCY-30, MMX2, MMY2)
This will work to change values.