Page 1 of 1
ranged pull does not work properly
Posted: Thu Sep 08, 2011 9:30 am
by pman
hi, i have a bit of a problem with ranged pull. my char is a rogue/scout, i use ranged in profile, and the skills vampire and shot. both of them have the range 180, so i changed the value in skills.xml from 200 to 180. in the profile i changed combat distance to 180 and max target distance to 300.
so, now my problem: if the bot targets a mob, it should run to dist 180, then attack. but it always stops before 180, then it tries again to run to 180, then stops before again, and so on. output looks something like this:
found target
try to pull it
go to, dist 180, actual 285
go to, dist 180, actual 205 (here the bot stops running)
go to, dist 180, actual 185 (here the bot stops running)
then it attacks
this is the best case, worst case happens, when the mob is heading slowly in the other direction, then the bot would only attack, if the mob stops moving. (i ignore this mobs with max fight time without dmg)
maybe the solution would be to update the target and bot location more often. and not stop running when doing this?
best regards
Re: ranged pull does not work properly
Posted: Thu Sep 08, 2011 10:19 am
by rock5
300 is pretty far. By the time you get to where the mob was it could have traveled some distance. If you have it keep moving forward you could run into it if it's moving toward you.
The problem is that when attacking it uses the moveTo function to move to the coordinates in range. It only rechecks the target after the move is finished. Moveto doesn't go to a mob it goes to a coordinate.
The only way I can see to readjust as it's moving is to add the option for moveTo to move towards pawns as well as waypoints.
That's a big change. Probably worth it though but I'll have to think about it overnight.
BTW once you reach the target, if it's moving away from you, you might have better luck attacking if you set the combat distance to less than 180. Maybe 175 or 170 so that you have time to stop and shoot before it goes out of range again.
Re: ranged pull does not work properly
Posted: Thu Sep 08, 2011 10:51 am
by pman
would it not be much easier to use the attack skill to move to the mob after targeting, instead of the last known coordinates? and check distance a few times while doing that?
edit: with attack skill i mean this skill every class have, i don't know the name of this skill

Re: ranged pull does not work properly
Posted: Thu Sep 08, 2011 2:09 pm
by Administrator
rock5 wrote:The only way I can see to readjust as it's moving is to add the option for moveTo to move towards pawns as well as waypoints.
Already can, I believe. And if it is a pawn, it should continually update it's position while moving. Only thing is, we would have to add in an option for the range, as you certainly wouldn't want the character running into melee range for for a 180 range skill.
Re: ranged pull does not work properly
Posted: Thu Sep 08, 2011 6:37 pm
by rock5
Administrator wrote:rock5 wrote:The only way I can see to readjust as it's moving is to add the option for moveTo to move towards pawns as well as waypoints.
Already can, I believe. And if it is a pawn, it should continually update it's position while moving.
I missed that last night. Although I'd already decided that would be easy to add. I should have realised when I saw the dummy waypoint:update() function.
Administrator wrote:Only thing is, we would have to add in an option for the range, as you certainly wouldn't want the character running into melee range for for a 180 range skill.
I came to that conclusion too. At first I thought I would just modify moveInRange but that uses MoveTo and you'd end up with the same problem. The only solution is to add range to moveTo, making moveInRange effectively obsolete.
Shouldn't be too difficult. Just a matte of moving the range calculations into the moveto function.
Re: ranged pull does not work properly
Posted: Fri Sep 09, 2011 11:41 am
by rock5
pman, I've done the necessary changes and done some testing. Unfortunately it's not really possible for me to reproduce the problem so could you please test this file under the same conditions and let me know how it performs?
It should continuously re-adjust where it is heading to as it moves into range. So even if the mob is moving, it shouldn't stop moving until in range.