Page 1 of 1
Reduce time when stuck?
Posted: Sat Oct 02, 2010 1:14 am
by xtremeuser
Just a thought, when a char is running along a path, on the odd occasion, he fights another mob before returning to path so is off course, this is fine, however if a wall is in the way, he continues to run into the obstacle for 5-6 secs or so. Didnt time it but does it for way too long. When it gets stuck, it then takes a step back, moves a little to the side and tries again.
Possible to reduce amount of seconds it runs into an obstacle, and is it possible to change the distance it moves to one side to try again. I wish to change the run in obstacle for about 2 secs max before moving back, and when moving to the side, would like it to move another few feet, Eg does 1-2 steps now, be better if done 5 steps.
Re: Reduce time when stuck?
Posted: Wed Dec 15, 2010 8:51 am
by botje
sorry to bump a old thread, but i would like to see this too, and i dont see why i would make a new thread when this one is not even awnsered ^^
Botje
Re: Reduce time when stuck?
Posted: Wed Dec 15, 2010 10:07 am
by lisa
I think the trouble is the bot needs to work out if it is stuck first, if you make it to sensative to this then it will walk along and then just think its stuck because it got a slow effect from a mob and if it's too sensative you will see a lot more chars stepping back and then side stepping a little and then walking a bit more.
I've been noticing a lot more lately the bot thinking it is stuck when there is nothing in front of it at all, I'd hate to see that even more.
Re: Reduce time when stuck?
Posted: Wed Dec 15, 2010 10:33 am
by botje
yeah, but if they could make it a option in profile, we could tweak it ourselfs ^^
Botje
Re: Reduce time when stuck?
Posted: Wed Dec 15, 2010 1:19 pm
by deveyus
Just go in and make a hand edit to the bot then.
Re: Reduce time when stuck?
Posted: Fri Dec 17, 2010 5:24 am
by botje
and you think i would not do that if i knew how or where? O.o
Botje
Re: Reduce time when stuck?
Posted: Fri Dec 17, 2010 10:25 pm
by jduartedj
Check file player.lua under folder Classes.
There is the function unstick but what you are looking for is the line in function moveTo that determines the wait time until it returns sucess=false (there is a check that if moveTo success = false then unstick). This is by default 3 seconds, set it to 1 if you want to. But remember.... I'M NOT RESPONSIBLE for your actions!
this is the code you're looking for:
Code: Select all
if( os.difftime(os.time(), self.LastDistImprove) > 3 ) then
-- We haven't improved for 3 seconds, assume stuck
success = false;
failreason = WF_STUCK;
break;
end