Results 1 to 2 of 2

Thread: FindObjEx

  1. #1
    Join Date
    Mar 2011
    Location
    Somerset, UK
    Posts
    304
    Mentioned
    0 Post(s)
    Quoted
    24 Post(s)

    Default FindObjEx

    FindObjEx(x, y,OBST_T[ObstN],OBST_C[ObstN], tol, 2, MSX1, MSY1, MSX2, MSY2)

    will return the x and y of the colors ..

    how can i then create a box a little bigger then the x and y lets say + 20 and -20 each way to use as the MSX1 MSY1 MSX2 MSY2 for anouther
    FindObjEx(x, y,OBST_T[ObstN],OBST_C[ObstN], tol, 2, MSX1, MSY1, MSX2, MSY2)

  2. #2
    Join Date
    Apr 2007
    Location
    Colchester, UK
    Posts
    1,220
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Simba Code:
    procedure findit;
    var
    x, y:integer;
    search:TBox;
    begin
      if FindObjEx(x, y,OBST_T[ObstN],OBST_C[ObstN], tol, 2, MSX1, MSY1, MSX2, MSY2)then
      begin
        search.x1:= x - 20;
        search.y1:= y - 20;
        search.x2:= x + 20;
        search.y2:= y + 20;
        if FindObjEx(x, y,OBST_T[ObstN],OBST_C[ObstN], tol, 2, searchX1, search1, searchX2, searchY2)then
        begin
          Writeln('Found it after two searches');
        end;
      end;
    end;

    that would do it

Thread Information

Users Browsing this Thread

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

Posting Permissions

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