FindClosestActorFromRef - Game
Revision as of 15:26, 18 October 2011 by imported>Vitamant (1 revision: Clobber re-import by Henning)
Member of: Game Script
Finds the closest actor within a given radius of a reference.
Syntax
Actor Function FindClosestActorFromRef(ObjectReference arCenter, float afRadius) global
Parameters
- arCenter: The reference to search around
- afRadius: Maximum distance from center to look for an actor
Return Value
The closest actor found, none if none.
Examples
; Find the closest actor to the player, limiting the search to 5 units
Actor closest = Game.FindClosestActorFromRef(Game.GetPlayer(), 5.0)