How to reference individual actors from GetAllActorsOfClass?

For my current project, I am trying to figure out how to reference individual actors from the array returned from the GetAllActorsOfClass function.

I made it so that there can be no more than 2 of the particular actor I’m working with in the world at any given time. I would like to be able to get both of the actors individually, get their world locations, and use LineTraceByChannel to calculate the distance between them.

Here is what I have so far:

Thanks for your help!

You can use a simple get from the array and put their index values in like shown below:

The element in any array starts at zero so juts get index zero and one and get the first two in the array.

You might also get the length from the array and double check that it has returned at least two results before doing the rest of you logic as well.