AI Movement

Last modified by KDearnley on 2023/07/31 14:06

The AI Path Points and AI Combat Points can be strung together to give direction to AI or create combat tactics. The Path points allow the AI to optionally unfollow for combat, while the Combat points require the AI to reach the point before engaging in combat.

When an AI reaches the final Path point, it is free to leave and engage in standard AI behavior. When an AI reaches the final Combat Point, they will try to stay near the point and defend it. If the AI is ranged, it will try to hang around near the Combat Point. Some ranged AI will do a better job of staying near the Combat Point, with Imps being the most impatient and leaving the point as soon as they lose sight of the player. Melee AI will generally leave the Combat Point to pursue the player, which makes Combat Points almost identical to Path Points for melee AI such as Barons, Pinkies and The Possessed.

AI Pathing

The tutorial map Advanced Training : AI Path Points explains how to place and connect AI Path Points to provide a route for an AI. AI paths can contain a mix of Path or Combat points.

AIPathing.PNG



Paths can be a straight line or a loop. AI can only break free from a loop if at least one point is a Path Point what has its Unfollow for Combat property set to true. AI will never unfollow from Combat path points, they must reach the point's location before engaging in combat.

Standing Still

There are a few ways to get an AI to stand in one place. The simplest way is to create an AI path of two points placed on top of eachother.

Add two AI Path points. Make sure that the Unfollow for Combat property is set to false on both path points.

AIStanding.PNG


Connect the two points in both directions, creating a loop from the two points.

AIStanding2.PNG


Place both points on the same spot, with the same orientation. Use the rotate and snap to grid controls to help with placement. Any AI that follows this path will stand at the spot where both points are placed.

Related Pages

The Refollow After Combat page has an example of simple MOBA-like behavior crafted from AI Path Points.

The AI_Follow_Player pattern allows you to create an AI companion that follows a player around a map.

Tags: Basics