does we can put tolerence to the color in the radance walk ?? and how ??
but if we cant , how we can put find one of these colore ...
does we can put tolerence to the color in the radance walk ?? and how ??
but if we cant , how we can put find one of these colore ...
Formerly known as FrancisHelie
To put tolerance you have to make a variable to find the colour with that tolerance, then out that variable into the radial walk function, like this:
SCAR Code:Procedure Walk;
Var
x, y, c :integer;
Begin
c := FindColorTolerance(x, y, {colour here}, {x coord 1{, {y coord 1}, {x coord 2}, {y coord 2}, {tolerance});
RadialWalk(c, {rest of the radial walk stuff here});
end;
This won't compile, but if you change the commented bits out it will run if you put that procedure in the main loop.
And to find a colour just use the colour picker on the main toolbar.
[offtopic] <3 DR!! [/offtopid]
You can alter the radialWalk function yourself in SRL and call it something different:
SCAR Code:function RadialWalkMod(TheColor: Integer; StartRadial, EndRadial: Integer; Radius: Integer; Xmod, Ymod: Integer): Boolean;
var
tpa: TPointArray;
i: Integer;
begin
Result := False;
if RadialWalkEx(tpa, MMCX, MMCY, TheColor, 10 {<- change tolerance}, StartRadial, EndRadial, Radius) then
for i := 0 to High(tpa) do
if MFNF(tpa[i].x, tpa[i].y, Xmod, Ymod) then
begin
FFlag(10);
Result := True;
Break;
end;
end;
For instance in here I have changed the tolerance from 0 to 10![]()
thanx for your help but i only used RadialWalkEx and it work great
Formerly known as FrancisHelie
There are currently 1 users browsing this thread. (0 members and 1 guests)