Description
Wiki Description
Finds the closest Actor within a given radius of a ObjectReference.
Documentation Comment
Finds the closest actor within a given radius of a reference
Caveats
CK Wiki - Notes
- The player is an actor, so this function can return the player if they are the closest actor to arCenter.
- If an actor is used as the center of this search, that actor's reference will always be the one returned by this function, so it cannot be used to find the closest actor to another actor, including the player.
Parameters
Examples
; Find the closest actor to the player, limiting the search to 5 units
Actor closest = Game.FindClosestActorFromRef(RefProperty, 5.0)Auto-Generated Example
ObjectReference myObjectReference__arCenter
float myFloat__afRadius
Actor returnedValue = Game.FindClosestActorFromRef(myObjectReference__arCenter, myFloat__afRadius)Related Pages
- Game
- Game.FindClosestActor(...)
- Game.FindRandomActor(...)
- Game.FindRandomActorFromRef(...)
