Jump to content

Random path Walking (use waypoints)


LifezHatred

Recommended Posts

  • 2 weeks later...

Well, thanks for your snippet.

 

But, I have a bug or I am kinda stupid:

 

If I try to use this code:

if (walkToLocation(new Position(3101, 3421, 0))) {
 walkToLocation(new Position(3098,3456,0));
}

Then, if I'm on position 3101, 3421, 0 then it goes to 3098,3456,0. But, half way from the first waypoint, it's going back to first waypoint.

 

Best regards,

Hirvi.

 

EDIT:: My mistake, was so stupid, to see the second post, that was the answer to me.

 

Thanks for Snippet, It's best IMO so far! ;)

Edited by Hirvi1997
Link to comment
Share on other sites

I'm not going to lie, but there is no code in there which handles walls/buildings and such, you're basically just walking however many tiles in the direction of the goal... I have no idea how this works so well(I havn't tried it) but from the code it doesn't look all too great no offense, very simplistic and seems likely to get stuck very easily. If you could please explain how this works through walls and obstacles, I would be delighted.

 

I have made a walker of my own on p****bot, and I can tell from the code this can get stuck easily if walking long distances... but if just too/from bank, it should be no problem. Please don't claim it can walk any distance because unless you've tested it many times, I can almost guarantee you it will get stuck at castle walls/long fences/big obstacles. Mine had the same problem, and it was much more complex, so I know yours will be worst haha.

 

Seriously i'm not hating, but do explain, I could be horribly wrong and look like a complete idiot smile.png

 

(i've been coding for 5 years, have written many scripts for many bots, developed full games, etc... just a little background.)

 

Seriously i'm not hating friend, I'm just giving you some honest constructive criticism, so please don't flame me, I'm only trying to help bud.

 

Edited by samy109
Link to comment
Share on other sites

  • 3 weeks later...

I'm not going to lie, but there is no code in there which handles walls/buildings and such, you're basically just walking however many tiles in the direction of the goal... I have no idea how this works so well(I havn't tried it) but from the code it doesn't look all too great no offense, very simplistic and seems likely to get stuck very easily. If you could please explain how this works through walls and obstacles, I would be delighted.

 

I have made a walker of my own on p****bot, and I can tell from the code this can get stuck easily if walking long distances... but if just too/from bank, it should be no problem. Please don't claim it can walk any distance because unless you've tested it many times, I can almost guarantee you it will get stuck at castle walls/long fences/big obstacles. Mine had the same problem, and it was much more complex, so I know yours will be worst haha.

 

Seriously i'm not hating, but do explain, I could be horribly wrong and look like a complete idiot smile.png

 

(i've been coding for 5 years, have written many scripts for many bots, developed full games, etc... just a little background.)

 

Seriously i'm not hating friend, I'm just giving you some honest constructive criticism, so please don't flame me, I'm only trying to help bud.

You are suppose to use waypoints to maneuver around objects, it isn't a path finder it's a path walker

 

EDIT:

Glad a lot of people found this useful, back when i made it the clients walk method was way too bugged for this to work in every situation

Edited by LifezHatred
Link to comment
Share on other sites

I'm not going to lie, but there is no code in there which handles walls/buildings and such, you're basically just walking however many tiles in the direction of the goal... I have no idea how this works so well(I havn't tried it) but from the code it doesn't look all too great no offense, very simplistic and seems likely to get stuck very easily. If you could please explain how this works through walls and obstacles, I would be delighted.

 

I have made a walker of my own on p****bot, and I can tell from the code this can get stuck easily if walking long distances... but if just too/from bank, it should be no problem. Please don't claim it can walk any distance because unless you've tested it many times, I can almost guarantee you it will get stuck at castle walls/long fences/big obstacles. Mine had the same problem, and it was much more complex, so I know yours will be worst haha.

 

Seriously i'm not hating, but do explain, I could be horribly wrong and look like a complete idiot smile.png

 

(i've been coding for 5 years, have written many scripts for many bots, developed full games, etc... just a little background.)

 

Seriously i'm not hating friend, I'm just giving you some honest constructive criticism, so please don't flame me, I'm only trying to help bud.

 

1. If you've been developing for 5 years and can't make a webwalker, you're doing something wrong.

2. Can you read?

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...