Make ai follow road?

hello, does anyone have an idea how i can make an ai follow a road in its priority…

im thinking it could be done probably with some ai path nodes that forwards to the next node…

but what if in a game, like for example, it senses an enemy further down the road…
how can i make it think like, i have to make a detour, go around or i have to leave the road and probably go around the mountain…

If your talking about a basic character AI, Unreal put out a decent tutorial on path nodes. You can find it on YouTube. As for a vehicle, there seems to be a lot of us looking for a simple solution. Peter Newton has put out a few examples of path following using path nodes. I’ve tried Peter’s method. It’s not for a beginner and it needs a lot of work. It hasn’t been updated in a while so I don’t know how he’s doing with it. Also Jiri.Dockal has a plug in for using splines. It looks promising. I plan on trying it. You can find either one by doing a search.