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!)
A* Pathfinding
Moderator: Developers
-
- {]-[0{0|307 (Developer)
- Posts: 1864
- Joined: Wed Jul 23, 2008 4:22 am
- Location: Minnesota, USA
Re: A* Pathfinding
Likely the waypoint was randomly generated inside the wall, and the troll can't get to it.
- Zefz
- Squirrel Knight (Administrator)
- Posts: 3820
- Joined: Wed Jul 23, 2008 1:27 am
- Location: Norway
- Contact:
Re: A* Pathfinding
New waypoints are generated every 1/2th of a second, so that shouldn't be a problem...
-
- {]-[0{0|307 (Developer)
- Posts: 1864
- Joined: Wed Jul 23, 2008 4:22 am
- Location: Minnesota, USA
Re: A* Pathfinding
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.
- Zefz
- Squirrel Knight (Administrator)
- Posts: 3820
- Joined: Wed Jul 23, 2008 1:27 am
- Location: Norway
- Contact:
Re: A* Pathfinding
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.
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)