iBlank
2012-03-28 13:00:47
I am trying to use pixel-shift to determine if my guy is animating while fishing for rocktails. I learned from Flight's TuT, but it seems like the average pixel-shift is heavily dependent on the people around me and fishing for rocktails is always very active/crowded. Is there anyway to focus specifically on my character?
Flight
2012-03-28 13:16:30
What's tricky about pole fishing is it's hard to rely on PixelShift to determine if we're currently fishing because our player actually moves very little. What you need to do is find an angle at which your pole will always appear in the same spot and then search in a small surrounding area for the color of your fishing pole.
This is very difficult because, depending on which spot you're fishing at, this "search area" will altar. Also, if it's too big you might get false-positives saying that you are fishing when in reality you're not but the script caught the color of someone else's fishing pole standing beside you. Should you make this "search area" too small then your pole color won't be recognized and the script will always assume you're not fishing.
If I were you I'd do something else. I would keep track of my inventory count, and every time it changes (as in we caught a fish) then reset a "Fishing Timer" or whatever. But if the inventory does not change after X amount of seconds (your Fishing Timer) then the script will assume we've stopped fishing. Because of the dynamics of pole-fishing, this would be your best choice.
The pixel-shift function in Flight's guide should focus specifically on your player.
If you do not think it does, then you can adjust it accordingly.
EDIT: After reading Flights post, go with his advice :p