Description
Wiki Description
Finds the closest Actor within a given radius of a location.
Documentation Comment
Finds the closest actor within a given radius of a location
Caveats
CK Wiki - Notes
- Works as expected, however if the coordinates provided are from an actor(using the getpositionXYZ) with no offsets, the return value will be that of the actor. In other words, the closest actor at that's actor's position will be the actor itself.
Parameters
floatafX
CK Wiki Description
center of the search, X component
floatafY
CK Wiki Description
center of the search, Y component
floatafZ
CK Wiki Description
center of the search, Z component
Examples
; Find the closest actor to 0,0,0, limiting the search to 5 units
Actor closest = Game.FindClosestActor(0.0, 0.0, 0.0, 5.0)Auto-Generated Example
float myFloat__afX
float myFloat__afY
float myFloat__afZ
float myFloat__afRadius
Actor returnedValue = Game.FindClosestActor(myFloat__afX, myFloat__afY, myFloat__afZ, myFloat__afRadius)Related Pages
- Game
- Game.FindClosestActorFromRef(...)
- Game.FindRandomActor(...)
- Game.FindRandomActorFromRef(...)
Additional References
View this function’s page on the Fallout 4 Creation Kit Wiki
