How to make actor detect closest player, and save it in variable?

  1. Find all actors of class
  2. For loop these and do:
  • calculate distance (I believe this is a node) between the two actors
  • Check if this distance is closer than the saved distance
  • Save this distance AND the actor if closer

You’ll need:

  1. A distance (float) variable
  2. Prob an actor variable or whatever type you’re distancing to