Well im trying to make a function that will find a cow and then call a function called KillCow and if that works call a function called PickUpCow
so it would be like
SCAR Code:
Function FindCow:Boolean;
Begin
SetColour;
If Not (FindColorSpiralTolerance(x,y,Cow1,msx1,msy1,msx2,msy2,25)) Then
//4 more colours 1 though 5
Else If KillCow Then PickUpCow;
But how would i get that to work with all 5 colours?
So far i have
SCAR Code:
Function FindCow:Boolean;
Begin
SetColour;
If Not (FindColorSpiralTolerance(x,y,Cow1,msx1,msy1,msx2,msy2,25)) Then
If Not (FindColorSpiralTolerance(x,y,Cow2,msx1,msy1,msx2,msy2,25)) Then
If Not (FindColorSpiralTolerance(x,y,Cow3,msx1,msy1,msx2,msy2,25)) Then
If Not (FindColorSpiralTolerance(x,y,Cow4,msx1,msy1,msx2,msy2,25)) Then
If Not (FindColorSpiralTolerance(x,y,Cow5,msx1,msy1,msx2,msy2,25)) Then
Result := False
Else KillCow
Else KillCow
Else KillCow
Else KillCow
Else KillCow
End;
Thanks
~Rya