From: Mysickname
okay thanks, but how do i do a box with the colours?
if (CountColorTolerance(YellowBirdColor, xs, ys, xe, ye, Tolerance) > 20) then
WriteLn('Birds! We are stunned!')
Find
YellowBirdColor by using the color picker tool and clicking the yellow birds.
Find
xs and
ys by using the color picker tool and clicking the
top left corner of the box around your player's head.
Find
xe and
ye by using the color picker tool and clicking the
bottom right corner of the box around your player's head.
Find
Tolerance using guess and check. (Try 5 or 10, higher number means it will find more similar colors)
20 is the number of pixels that will have to be yellow for it to think it's stunned. You can find it out by counting the colors in the box, but you should go with a number that is less than the number that are yellow just to be safe.