Ok easy one...

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

Wormbo

Administrator
Staff member
Jun 4, 2001
5,913
36
48
Germany
www.koehler-homepage.de
Please be more specific.
What kind of actors? (pawns, projectiles, anything)
Is there a certain maximum distance or do you want to search on the whole map?
Should the actors be visible to your reference point?

There are several ForEach iterators and for pawns you could even use a For loop.
 

Brood_of_Evil

Selene's martyr
Nov 3, 2001
147
0
0
45
Look outside your window!
Visit site
ok

I will use forach AllActors, there's not minimum or maximum distance, the actor is a projectile. I am familiar with how the forach iterators work, I just want to figure out which one of the actors I'm looping thorough is closer to me, which I am owner off.
 

Wormbo

Administrator
Staff member
Jun 4, 2001
5,913
36
48
Germany
www.koehler-homepage.de
In this case you should compare VSize(Your.Location - theProjectile.Location):
Code:
foreach allactors(<you know whats in here>) {
 if ( minDist > VSize(Your.Location - theProjectile.Location) ) {
  minDist = VSize(Your.Location - theProjectile.Location);
  minDistProjectile = theProjectile;
 }
}
(Or something like that.:) )