
08-26-2007, 06:00 AM
|
|
Will work for food. Maybe
|
 |
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
|
|
|
There's no real way to avoid that other than upping the check. Actually, his script is using onwall2, and checking a whole tile rather than a single pixel, so that's a good step in avoiding that problem. I believe this is the simplest way to do this other than doing a lot of of CPU hogging loops.
As for going around walls, I've done something similar, which I posted in the code gallery if you want to check it out. Instead of doing pathfinding like A*, it simple logged the players movements and 'followed' them. It was kind of cheating, but it worked, if you want to get ideas from it. |
|
|
|