PDA

View Full Version : What's the difference between FindColorTolerence and FindColorSpiralTolerence?



solarwind
10-21-2006, 04:18 AM
Hi all, I have a question regarding color searching.

What's the difference between FindColorTolerence and FindColorSpiralTolerence?

I don't understand what the SCAR help is saying about them.

IronTeapot
10-21-2006, 04:29 AM
FindColorTolerence looks for your color in the area you have told it to, searching from left to right

FindColorSpiralTolerence searches for your color starting at the x and y points, and searches outward.

Wizzup?
10-21-2006, 06:21 AM
I always though spiral started in the centre point of x1,y1,x2,y2?

Has nothing to do with the x and y output. :wink:

solarwind
10-21-2006, 06:25 AM
Wow, thanks a lot for your explination. However, what method is better? If I want to search for things such as the log in the gnome agility course, which method should i use?

IronTeapot
10-21-2006, 03:09 PM
@ Wizzup?

The exact information as in the SCAR help file.


function FindColorSpiral(var x,y: Integer; color, xs, ys, xe, ye: Integer): Boolean; - find color in box specified by xs, ys, xe, ye but start from x,y.

Using FindColorSpiralTolerance has the same function, just with a color tolerance.

WhiteShadow
10-21-2006, 03:53 PM
I always though spiral started in the centre point of x1,y1,x2,y2?

Has nothing to do with the x and y output. :wink:


program New;
var x, y : Integer;


procedure Example1; //FindColorTolerance.
begin
if(FindColorTolerance(x, y, iColor, 46, 15, 553, 256, 5))then
Writeln('Found');
end; //This scans from top left hand corner to the right bottom corner.

procedure Example2; //FindColorSpiralTolerance
begin
x:= 283;
y:= 156;
if(FindColorSpiralTolerance(x, y, iColor, 46, 15, 553, 256, 5))then
Writeln('Found');
end;
//This scans starting from (283, 156); then outwards from that coord.
//Same thing with FindBitmapToleranceIn and FindBitmapSpiralTolerance.

solarwind
10-21-2006, 04:49 PM
thanks a lot guys!

I Pick Axes
10-21-2006, 08:35 PM
Wow, thanks a lot for your explination. However, what method is better? If I want to search for things such as the log in the gnome agility course, which method should i use?

Try to set X and Y to where you think the log is and use a spiral.

solarwind
10-22-2006, 12:24 AM
Thanks all for your suggestions! My script is coming along nicely! The only issue left is to fix the amazing amout of lag there is. The lag seems to only occur when it's searching. Any suggestions on how to improve the script to make it have less lag?

WT-Fakawi
10-22-2006, 12:28 AM
put a small Wait(1+Random(10)) in.

Boreas
10-27-2006, 05:01 AM
As a general rule do that when there is lag. This may be why you think scar is slow.