Results 1 to 4 of 4

Thread: Repeating and colour checking

  1. #1
    Join Date
    Dec 2011
    Posts
    183
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Repeating and colour checking

    Can anyone help me by explaining how to do these two simple things?

    Repeat a procedure for an amount of times.

    Check the colour of a specific pixel. If false redo procedure but if true move onto next procedure.

  2. #2
    Join Date
    Aug 2007
    Location
    Colorado
    Posts
    7,421
    Mentioned
    268 Post(s)
    Quoted
    1442 Post(s)

    Default

    Simba Code:
    Procedure LoopIt;
      Var
        i: Integer;
      begin
        for i := 0 to 100 do   //Start at 0 and loop anything 100 times
        begin
          Writeln('Loop number '+IntToStr(i));
          //Whatever else
        end;
      end;

    Current projects:
    [ AeroGuardians (GotR minigame), Motherlode Miner, Blast furnace ]

    "I won't fall in your gravity. Open your eyes,
    you're the Earth and I'm the sky..."


  3. #3
    Join Date
    Dec 2006
    Location
    Sydney, New South Wales, Australia
    Posts
    4,603
    Mentioned
    15 Post(s)
    Quoted
    42 Post(s)

    Default

    Also:

    Simba Code:
    if(GetColor(x, y) = colour) then
      ... // If the colour is found, do this.
    else
      ... // otherwise do this.

    You may contact me with any concerns you have.
    Are you a victim of harassment? Please notify me or any other staff member.

    | SRL Community Rules | SRL Live Help & Chat | Setting up Simba | F.A.Q's |

  4. #4
    Join Date
    Dec 2011
    Posts
    183
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Flight View Post
    Simba Code:
    Procedure LoopIt;
      Var
        i: Integer;
      begin
        for i := 0 to 100 do   //Start at 0 and loop anything 100 times
        begin
          Writeln('Loop number '+IntToStr(i));
          //Whatever else
        end;
      end;
    so if i wanted a simple mouse click in there, where would i put 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
  •