Help with FindColour()

Discussion in 'Scar/Simba Help' started by chris4815, Oct 25, 2010.

Help with FindColour()
  1. Unread #1 - Oct 25, 2010 at 9:52 AM
  2. chris4815
    Joined:
    Jan 2, 2010
    Posts:
    2
    Referrals:
    0
    Sythe Gold:
    0

    chris4815 Newcomer

    Help with FindColour()

    Hi I'm having a bit of a problem with FindColor(). I've used it before in my first script(This is my second) but I have since lost the script :( .
    Anyway This is for a 2D game where you press arrows to train your character a set of 5 is shown on the screen which you have to press in sequence.
    I got the colors for the tip of each arrow and the coords on the screen to search in but it just seems to fail. I would really appreciate any help any help or a better way of implementing this.

    Code:
    program train;
    var
     x,y:Integer;
    begin
         Writeln('Started');
         Wait(1000);
         if(FindColor(x,y,3881271,271,305,277,311) = True)then
            begin
             Writeln('1');
             sendarrowwait(3,10);
             Wait(500);
            end;
         if(FindColor(x,y,1773327,300,298,306,304) = True)then
            begin
             Writeln('2');
             sendarrowwait(0,10);
             Wait(500);
            end;
         if(FindColor(x,y,3881271,329,305,335,311) = True)then
            begin
             Writeln('3');
             sendarrowwait(1,10);
             Wait(500);
            end;
    end.
    
    Now individually each one works fine but when I put them together it messes up.

    Thanks Chris
     
  3. Unread #2 - Nov 8, 2010 at 1:29 PM
  4. Syd
    Joined:
    Aug 10, 2010
    Posts:
    218
    Referrals:
    2
    Sythe Gold:
    10

    Syd Active Member
    Banned

    Help with FindColour()

    Take the = then out and it should work...you have too many thens in an if statement.

    EDIT: keep the parenthesis after the = then.....you need two so you can close the if statement then the find color function.
     
< Help plzz. Im new -dont know how to add a script | >

Users viewing this thread
1 guest


 
 
Adblock breaks this site