This AI control is easier to implement than the previous one. Instead of creating a path to follow, we will simply indicate a coordinate our AI Unit has to move to. You need 2 entities to do this :
- a TagPoint entity to indicate where you want to AI Unit to go to
- an AreaTrigger entity to trigger the AI Unit movement and actually get him walking towards the TagPoint entity
|
Start placing the 3 entities on the map :
- In the RollupBar AI menu add the TagPoint entity
- In the RollupBar Entity menu add the AreaTrigger entity ( see screenshot on the right)
- Add a new AI Unit in the map (see previous tutorials if you don't know how to do so)

Now you have your 3 entities on the map, select your AreaTrigger entity and create a new Flow Graph (once again, see previous tutorial if you don't know how to do this). In the Flow Graph, you're going to have to add 3 different flow objects :
- Right click and pick Add Node > Misc > Start
- Right click and pick Add Node > AI > AIGotoSpeedStance
- Right click and pick Add Node > Entity > EntityPos
- Connect the Start entity Output to the AIGotoSpeedStance Sync input as shown below
- Connect the EntityPos pos output to the AIGotoSpeedStance pos input as shown below
- Select your TagPoint entity in your map then right click on the EntityPos flow box and choose Assign Selected Entity
- Select your AI Soldier in your map then right click on the AiGotoSpeedStance flow box and choose Assign Selected Entity
|
 |
If you did all these actions correctly, click on the
AI/Physics button in the bottom part of Sandbox2 editor window to see your entity move to the TagPoint.