Results 1 to 8 of 8

Thread: FindAnimation <--Finds a series of bitmaps or DTMs within a given time!

  1. #1
    Join Date
    Jul 2007
    Location
    Massachusetts
    Posts
    896
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default FindAnimation <--Finds a series of bitmaps or DTMs within a given time!

    This function will find a series of bitmaps or DTMs within a given time. It will wait MaxTime miliseconds for the next bitmap or DTM. I guess it could be useful for finding moving things.

    SCAR Code:
    {*******************************************************************************
    function FindAnimation(var x, y: Integer; DTMsOrBitmaps: TIntegerArray; x1, y1, x2, y2, MaxTime, Tol: Integer; DTM: Boolean): Boolean;
    By: Macrosoft
    Description: Finds a series of DTMs or Bitmaps within a given time.  It
    will wait MaxTime for the next Bitmap or DTM.  DTM should be set to True
    if using DTMs and False if using Bitmaps.
    *******************************************************************************}

    function FindAnimation(var x, y: Integer; DTMsOrBitmaps: TIntegerArray; x1, y1, x2, y2, MaxTime, Tol: Integer; DTM: Boolean): Boolean;
    var
      i, a, aLength: Integer;
    begin
      aLength := GetArrayLength(DTMsOrBitmaps);
      if(DTM=True)then
      begin
        for i:=0 to aLength-1 do
        begin
          a:=0;
          repeat
          begin
            wait(10);
            a:=a+1
          end;
          until (FindDTM(DTMsOrBitmaps[i], x, y, x1, y1, x2, y2) or (a / 10=MaxTime));
          if(a/10=MaxTime) then
          begin
            Result:=False;
            Exit;
          end;
        end;
      end else
      begin
        for i:=0 to aLength-1 do
        begin
          a:=0;
          repeat
          begin
            wait(10);
            a:=a+1
          end;
          until (FindBitMapToleranceIn(DTMsOrBitmaps[i], x, y, x1, y1, x2, y2, Tol) or (a/10=MaxTime));
          if(a/10=MaxTime) then
          begin
            Result:=False;
            Exit;
          end;
        end;
      Result:=True;
    end;

    Also, does anyone know of a FindDTMTol or somthing?

  2. #2
    Join Date
    Aug 2007
    Location
    England
    Posts
    734
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    To make tolerance in a DTM increase the point size or increase the color tolerance...
    The truth finally came out...


  3. #3
    Join Date
    Jul 2007
    Location
    Massachusetts
    Posts
    896
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    so how would i do this in the func? or would the person do it manually?

  4. #4
    Join Date
    Dec 2006
    Location
    Copy pastin to my C#
    Posts
    3,788
    Mentioned
    8 Post(s)
    Quoted
    29 Post(s)

    Default

    Use a DDTM...

    Gj though, but this kinda wouldn't work, angle changing of even ten degrees makes the DTMs useless.

  5. #5
    Join Date
    Nov 2006
    Location
    In an Amish Paradise
    Posts
    729
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Just make it it make a DDTM and check it every couple mill. secs.

    Look up tuts on DDTM... Thats your solution

    Hope this helps,
    ~Stupedspam

    Edit: Beat by n3ss3s....

  6. #6
    Join Date
    Jul 2007
    Location
    Massachusetts
    Posts
    896
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    i can use dtmrotated to search for a rotated dtm...

    kk ill try ddtms

  7. #7
    Join Date
    Dec 2006
    Location
    Banville
    Posts
    3,914
    Mentioned
    12 Post(s)
    Quoted
    98 Post(s)

    Default

    Actually, if you want tolerance, you would need to tell the user to include it in the DTM they make.
    The jealous temper of mankind, ever more disposed to censure than
    to praise the work of others, has constantly made the pursuit of new
    methods and systems no less perilous than the search after unknown
    lands and seas.

  8. #8
    Join Date
    Jul 2007
    Location
    Massachusetts
    Posts
    896
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    yeah, thats what i was thinking

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Finding BitMaps/DTMs
    By stupedspam in forum OSR Help
    Replies: 4
    Last Post: 05-19-2007, 01:32 AM
  2. Which to use DTMs or Bitmaps?
    By gwz in forum OSR Help
    Replies: 3
    Last Post: 11-26-2006, 06:15 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
  •