Results 1 to 4 of 4

Thread: radianwalk help

  1. #1
    Join Date
    Dec 2008
    Location
    Québec
    Posts
    419
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default radianwalk help

    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

  2. #2
    Join Date
    Dec 2007
    Location
    192.168.1.73
    Posts
    2,439
    Mentioned
    6 Post(s)
    Quoted
    119 Post(s)

    Default

    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.

  3. #3
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    [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

  4. #4
    Join Date
    Dec 2008
    Location
    Québec
    Posts
    419
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    thanx for your help but i only used RadialWalkEx and it work great
    Formerly known as FrancisHelie

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
  •