I remember seeing the 'line through poly' test method years back (and implemented it somewhere once) but had since forgotten it Solves the problem much more generically, although I'm not sure that we really need it - worse case, solve the problem with multiple rectangles - but then thats just painful as the evalTarget stuff would then need to check against multiple rectangles and will start to get very slow I would imagine.rock5 wrote:1. You could just use createpath and then extract the coordinates. The table the function expects would look something like this.2. Well, to be REALLY thorough you could do areas for every room and even the corridors if you want but most likely you would just do the difficult rooms and reduce the MAX_COMBAT_DIST a little for easier parts. This method would never be as easy as changing profile options but would yeild better results. So it's up to the user to decide if a certain problem would be best solved by using this method.
- table = {
}
- {X=1,Z=1},
{X=2,Z=2},
{X=1,Z=2},
3. Not sure. The bot already fights back when aggroing a mob that doesn't pass the default eval function so this should be no exception. It should fight back without any extra work. I'm pretty sure that the bot executes code from passed waypoints so that shouldn't be an issue. The only check I can think of that really needs to be done is to check if the target area is very far away, such as when the user forgets to clear it before moving away or teleporting. Then it should ignore it I think. Or maybe that will intoduce too much needless processing, I'm not sure.
It should be easy to implement. Just have a function to modify the "killzone" table and a check in the eval functionIt could be as simple as that.Code: Select all
if killzone then if not pnpoly(killzone,target.X,target.Z) then return false end end
I can't see any reason why the 'killzone' concept can't be generically added to the bot (as you mentioned) where it gets used if there is a killzone, or ignored if there isn't one.
From all my testing, it certainly solves a lot of targeting through walls etc problems.