Results 1 to 6 of 6

Thread: need a function to find a color closest to a point, excluding a certain part

  1. #1
    Join Date
    Jan 2007
    Posts
    13
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default need a function to find a color closest to a point, excluding a certain part

    I need a function to find colors closest to a set point excluding a range of coordinates, and return the coordinates of the closest color found.

    This is to make a bot to beat a game similar to zuma, if you have heard of it before, any help or tips will be greatly appreciated

  2. #2
    Join Date
    Mar 2007
    Posts
    10
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    what kind of range of coordinates, a list of points or a area in a box?

  3. #3
    Join Date
    Jul 2007
    Location
    Norway.
    Posts
    1,938
    Mentioned
    3 Post(s)
    Quoted
    0 Post(s)

    Default

    Try FindColorSkipBox.
    If you want more info on how to use it, look in the SCAR manual. (Press F1 while having SCAR opened.)

  4. #4
    Join Date
    Dec 2008
    Posts
    2,813
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    dang it D: I was just gonna say that.. >.<

    and their is like 5 different FindColorSkip.. things.. press ctrl + <space> and type Findcolorskip

  5. #5
    Join Date
    Jan 2007
    Posts
    13
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    function FindColorSkipBoxTolerance(var x, y: Integer; color, x1, y1, x2, y2, Tolerance: Integer; SkipBox: TBox): Boolean;
    Works like the regular FindColorSkipBox function but with a tolerance parameter for finding any similar color. Tolerance is used to find a color in range of the color you are looking for. The greater color range you want, the higher the tolerance parameter should be.


    I think I'll use this, but I need it to find the color closest to the centre, also how do I use this command, could I please have an example? The skipbox is the only thing I don't know how to use

    thanks

    joundill

  6. #6
    Join Date
    Sep 2006
    Posts
    5,219
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    You could use FindColorsSpiralTolerance, and then go through the resulting array until you get to a point you aren't excluding.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Find Color Closet to Center Point?
    By groog in forum OSR Help
    Replies: 4
    Last Post: 08-02-2008, 06:32 AM
  2. Replies: 6
    Last Post: 11-28-2007, 06:07 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
  •