koryperson
2014-01-14 00:37:27
Hi all,
So I'm trying to use Pixel Shift to determine whether or not I'm in the process of catching an impling in one of my hunting scripts. The only problem is that sometimes if the impling sits still, it will give me a very low average pixel shift and ruin everything… A solution could be that if it's true 3 times in a row, only then will it determine if it's hunting or not.
If anyone could tell me how to wait until a function is true more than 1 time in a row, that'd be awesome!
Thanks.
Here's what I'm using btw;
So I'm trying to use Pixel Shift to determine whether or not I'm in the process of catching an impling in one of my hunting scripts. The only problem is that sometimes if the impling sits still, it will give me a very low average pixel shift and ruin everything… A solution could be that if it's true 3 times in a row, only then will it determine if it's hunting or not.
If anyone could tell me how to wait until a function is true more than 1 time in a row, that'd be awesome!
Thanks.
Here's what I'm using btw;
function IsHunting: Boolean;
var
PBox: TBox;
begin
PBox := IntToBox(238, 139, 267, 177);
Result := (AveragePixelShift(PBox, 500, 750) > 220);
end;