FindClosestReferenceOfTypeFromRef - Game
Revision as of 17:13, 18 October 2011 by imported>Plplecuyer (→Syntax)
Member of: Game Script
Finds the closest reference of the given type from the location of the target reference and within the given radius.
Syntax
ObjectReference Function FindClosestReferenceOfTypeFromRef(Form arBaseObject, ObjectReference arCenter, float afRadius) global
Parameters
- arBaseObject: The type of base object to look for
- arCenter: Reference to use as a center to search from
- afRadius: Maximum distance from center to look for a reference
Return Value
The closest reference found, none if none.
Examples
; Find the closest diamond reference to the player, limiting the search to 5 units
ObjectReference closestDiamond = Game.FindClosestReferenceOfTypeFromRef(Diamond, Game.GetPlayer(), 5.0)
See Also
- Game Script
- FindClosestReferenceOfAnyTypeInList - Game
- FindClosestReferenceOfAnyTypeInListFromRef - Game
- FindClosestReferenceOfType - Game
- FindRandomReferenceOfAnyTypeInList - Game
- FindRandomReferenceOfAnyTypeInListFromRef - Game
- FindRandomReferenceOfType - Game
- FindRandomReferenceOfTypeFromRef - Game