FindClosestActorFromRef - Game
Revision as of 02:52, 2 September 2021 by imported>Scrivener07
Member of: Game Script
Finds the closest actor within a given radius of a reference.
SyntaxEdit
Actor Function FindClosestActorFromRef(ObjectReference arCenter, float afRadius) global
ParametersEdit
Return ValueEdit
The closest actor found, none if none.
ExamplesEdit
; Find the closest actor to the player, limiting the search to 5 units
Actor closest = Game.FindClosestActorFromRef(Game.GetPlayer(), 5.0)
NotesEdit
- As with the Skyrim counterpart, if an actor is used for arCenter, the return value will be that of arCenter. The example above was not tested by whoever put that there.