Pathfinding for AI

Kinda seems like a long shot and probably won’t be added soon but here’s just some ideas for pathfinding in general

  • make “unit” pathfind to “position”
    AI pathfinds to a certain position, can be a XY position or an units position
  • stop pathfinding for “unit”
    This would stop the pathfinding process and cause the AI to go idle. Not really necessary as there’s already an AI idle action and that can just be the replacement for this but I just included it just in case


You know the pathfinding options in the AI section right? Here’s my idea for it as well:

  • Simple
    The AI system it currently uses right now in modd, it just chases you around with no pathfinding involved.
  • Complex
    When an unit gets inside of its sensor, it pathfinds to the unit. Raycasts may be needed though as you’d have to make the unit not attack when the targeted unit is not in line of sight (so the attacking unit doesn’t try to shoot through the wall). It also includes units in its pathfinding process, so it pathfinds around the units as well.
  • Complex, ignore Units
    Same as Complex but instead it doesn’t include units in its pathfinding.

Just think about how much ideas pathfinding would introduce. I’m not sure if it’s easy to make though, but it would be cool to see in modd.io. If you’re going to add the pathfinding methods in the AI section of the unit, then the actions above like make “unit” pathfind to “position” aren’t necessary as you can just use the “command AI unit to _____” actions as a replacement for ones I suggested. Also yea this might be a little complicated to make but I’m pretty sure most of the time pathfinding is this complicated. I think. I made my own pathfinding script in modd but it lagged the game everytime it was finding a path, so it wasn’t really reliable (probably because I ran over 4000 loops).

3 Likes

:gigachad: Very good idea!!! It always confused me why there was only “Simple” :thinking: but yeah! :socialcredit:

2 Likes

I think they don’t know how to yet but I do, im just waiting for someone to respond for my request to add it

1 Like

they know how to do it, but it’s too laggy

1 Like

yeah because it has to detect which way is the farthest and if the unit can fit through areas, I have an example of it on scratch.

1 Like