A* Pathfinding

The development of the game itself or new resources for it. Any new stuff you're working on would go here, as well as the discussion of in-development stuff.

Moderator: Developers

User avatar
Zefz
Squirrel Knight (Administrator)
Squirrel Knight (Administrator)
Posts: 3820
Joined: Wed Jul 23, 2008 1:27 am
Location: Norway
Contact:

Re: A* Pathfinding

Post by Zefz »

No, that's the whole point of A* pathfinding that they will find the way around.

My bet there is something with the Line of Sight that causes the Troll to miss it's target but not exit combat mode (so it is trying to charge itself!)
bgbirdsey
{]-[0{0|307 (Developer)
{]-[0{0|307 (Developer)
Posts: 1864
Joined: Wed Jul 23, 2008 4:22 am
Location: Minnesota, USA

Re: A* Pathfinding

Post by bgbirdsey »

Likely the waypoint was randomly generated inside the wall, and the troll can't get to it.
User avatar
Zefz
Squirrel Knight (Administrator)
Squirrel Knight (Administrator)
Posts: 3820
Joined: Wed Jul 23, 2008 1:27 am
Location: Norway
Contact:

Re: A* Pathfinding

Post by Zefz »

New waypoints are generated every 1/2th of a second, so that shouldn't be a problem...
bgbirdsey
{]-[0{0|307 (Developer)
{]-[0{0|307 (Developer)
Posts: 1864
Joined: Wed Jul 23, 2008 4:22 am
Location: Minnesota, USA

Re: A* Pathfinding

Post by bgbirdsey »

Several ai's rely on IfAtLastWaypoint to re-generate their next destination. If their waypoint is in an invalid area, they just walk into a wall.
User avatar
Zefz
Squirrel Knight (Administrator)
Squirrel Knight (Administrator)
Posts: 3820
Joined: Wed Jul 23, 2008 1:27 am
Location: Norway
Contact:

Re: A* Pathfinding

Post by Zefz »

Afaik the IfAtLastWaypoint is only used by the Gelfeet to loop their waypoint list. I never use that function in my AI scripts.

Edit: Did a small search and found all objects using IfAtLastWaypoint. It seems indeed sandtroll is among them.

Code: Select all

  C:\Users\Johan Jansen\Programmering\Egoboo\basicdat\globalobjects\monsters\ghoul.obj\script.txt (1 hits)
  C:\Users\Johan Jansen\Programmering\Egoboo\basicdat\globalobjects\monsters\ghuul.obj\script.txt (1 hits)
  C:\Users\Johan Jansen\Programmering\Egoboo\basicdat\globalobjects\monsters\sandtroll.obj\script.txt (1 hits)
  C:\Users\Johan Jansen\Programmering\Egoboo\basicdat\globalobjects\monsters\ulna.obj\script.txt (1 hits)
  C:\Users\Johan Jansen\Programmering\Egoboo\modules\abyss2.mod\objects\platform.obj\script.txt (1 hits)
  C:\Users\Johan Jansen\Programmering\Egoboo\modules\advent.mod\objects\bossgrub.obj\script.txt (1 hits)
  C:\Users\Johan Jansen\Programmering\Egoboo\modules\heist.mod\objects\treasuryguard.obj\script.txt (1 hits)
  C:\Users\Johan Jansen\Programmering\Egoboo\modules\imprisoned2.mod\objects\bosstroll.obj\script.txt (1 hits)
  C:\Users\Johan Jansen\Programmering\Egoboo\modules\imprisoned3.mod\objects\crazynpc.obj\script.txt (1 hits)
  C:\Users\Johan Jansen\Programmering\Egoboo\modules\zippy.mod\objects\shep.obj\script.txt (1 hits)
Post Reply