FindRandomReferenceOfAnyTypeInListFromRef - 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 reference location and within the given radius.
Syntax[edit | edit source]
ObjectReference Function FindRandomReferenceOfAnyTypeInListFromRef(FormList arBaseObjectsA, ObjectReference arCenter, \
float afRadius) global
Parameters[edit | edit source]
- arBaseObjectsA: The list of valid base objects to look for
- arCenter: The reference to use as a center of the search
- 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 or the center reference, none if none was found.
Examples[edit | edit source]
; Find a random gem reference near the player, limiting the search to 5 units
ObjectReference randomGem = Game.FindRandomReferenceOfAnyTypeInListFromRef(GemList, Game.GetPlayer(), 5.0)