Results 1 to 4 of 4

Thread: Help with DDTM

  1. #1
    Join Date
    Mar 2007
    Location
    Ohio
    Posts
    138
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Help with DDTM

    SCAR Code:
    program CheesTM;
    {.include srl/srl.scar}

    var carMP : TDTMPointDef;
        carSP : array[0..3] of TDTMPointDef;
        carDTM : Integer;
        carDDTM: TDTM;
        x, y : Integer;
       
    procedure LoadDTM;
    begin
      carMP.x := 187
      carMP.y := 316
      carMP.areasize := 1;
      carMP.areashape := 0;
      carMP.Color := 12750
      carMP.tolerance := 255;
     
      carSP[0].x := 177;
      carSP[0].y := 316;
      carSP[0].areasize := 2;
      carSP[0].areashape := 0;
      carSP[0].Color := 12750;
      carSP[0].tolerance := 10;
     
      carSP[1].x := 197;
      carSP[1].y := 316;
      carSP[1].areasize := 2;
      carSP[1].areashape := 0;
      carSP[1].Color := 12750;
      carSP[1].tolerance := 10;
     
      carSP[2].x := 187;
      carSP[2].y := 306;
      carSP[2].areasize := 2;
      carSP[2].areashape := 0;
      carSP[2].Color := 2039583;
      carSP[2].tolerance := 10;
     
      carSP[3].x := 177;
      carSP[3].y := 326;
      carSP[3].areasize := 2;
      carSP[3].areashape := 0;
      carSP[3].Color := 8684676;
      carSP[3].tolerance := 10;

      carDDTM.MainPoint := carMP;
      carDDTM.SubPoints := carSP;
      carDTM := AddDTM(carDDTM);

    end;

    procedure FindScar;
    begin
      if(FindDTM(carDTM, x, y, 0, 0, 1024, 768))then
      begin
        Writeln('Scar Found!!');
        mmouse(x, y, 3, 3);
        GetMousePos(x, y);
        WriteLn('Your Points are: ' + IntToStr(x)+ ', ' + IntToStr(y) + '.');
      end;
    end;

    begin
    SetupSRL;
    LoadDTM;
    FindScar;
    end.


    Thats my little test script, of a DDTM i made of the Scar icon on your desktop.
    My problem is that it will only find scar if its in a certain slot, for me its 3 right and 4 down, its where the x, and y values are set at.
    So if any of you guys want to give me a hand on how to improve my DDTM or just help my fix it, any help will be appreciated

  2. #2
    Join Date
    Mar 2007
    Location
    Ohio
    Posts
    138
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

  3. #3
    Join Date
    Apr 2007
    Location
    Perth, Australia
    Posts
    3,926
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    Sorry doesn't work for me. Also just to let you know a normal DTM would be better in this situation but its good to see you trying to learn new stuff.

  4. #4
    Join Date
    Mar 2007
    Location
    Ohio
    Posts
    138
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    alright it works for me, but it has to be in a different spot otherwise it fails.
    yea a DTM would work better and be simpler but im just trying to learn

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. If there is a DDTM....
    By Claymore in forum OSR Help
    Replies: 6
    Last Post: 07-07-2008, 03:43 AM
  2. DDTM problem
    By iroki_ in forum OSR Help
    Replies: 2
    Last Post: 04-14-2008, 07:49 PM
  3. DDTM help
    By [S]paz in forum OSR Help
    Replies: 12
    Last Post: 02-16-2008, 06:18 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •