FindRandomReferenceOfAnyTypeInList - Game
Jump to navigation
Jump to search
Member of: Game Script
Finds a random reference of any of the types in the list from the given location and within the given radius.
Syntax[edit | edit source]
ObjectReference Function FindRandomReferenceOfAnyTypeInList(FormList arBaseObjects, float afX, float afY, float afZ, float afRadius) native global
Parameters[edit | edit source]
- arBaseObjects: The list of valid base objects to look for
- afX: center of the search, X component
- afY: center of the search, Y component
- afZ: center of the search, Z component
- afRadius: Maximum distance from center to look for a reference
Return Value[edit | edit source]
A random reference of of any of the types within the radius, none if none was found.
Examples[edit | edit source]
; Find a random gem reference to 0,0,0, limiting the search to 5 units
ObjectReference randomGem = Game.FindRandomReferenceOfAnyTypeInList(GemList, 0.0, 0.0, 0.0, 5.0)
See Also[edit | edit source]
- Game Script
- FindClosestReferenceOfAnyTypeInList - Game
- FindClosestReferenceOfAnyTypeInListFromRef - Game
- FindClosestReferenceOfType - Game
- FindClosestReferenceOfTypeFromRef - Game
- FindRandomReferenceOfAnyTypeInListFromRef - Game
- FindRandomReferenceOfType - Game
- FindRandomReferenceOfTypeFromRef - Game