Get distance from one AI to other AI

Hello,

I implemented the get distance to player controller with no problems, but i’m trying to do the same with another AI character and i can’t find the solution.
I need to get the distance from one AI to other(s) AI… how i can do that?

Thanks in advance.

It should be the same as the solution you have for player. Get your AI characters as Actor and then call GetActorLocation and subtract them and return the Length of the vector. Are you having difficulty referencing the two actors?

I don’t use getactorlocation… Just placing the AI reference and having a returning value of 0. I do this way because for the player only need the getcontroller linked.

I going to try placing getactorlocation…
Thanks, for the reply