ObjectReferencefunctionFindRandomReferenceOfAnyTypeInListFromRef(FormListarBaseObjects, ObjectReferencearCenter, floatafRadius)Global
Description
Wiki Description
Finds a random ObjectReference of any of the types in the list from the given ObjectReference location and within the given radius.
Documentation Comment
Finds a random reference of a given base object within a given radius of a reference
Caveats
Parameters
Examples
; Find a random gem reference near the player, limiting the search to 5 units
ObjectReference randomGem = Game.FindRandomReferenceOfAnyTypeInListFromRef(GemList, Game.GetPlayer(), 5.0)Auto-Generated Example
FormList myFormList__arBaseObjects
ObjectReference myObjectReference__arCenter
float myFloat__afRadius
ObjectReference returnedValue = Game.FindRandomReferenceOfAnyTypeInListFromRef(myFormList__arBaseObjects, myObjectReference__arCenter, myFloat__afRadius)Related Pages
- Game
- Game.FindClosestReferenceOfAnyTypeInList(...)
- Game.FindClosestReferenceOfAnyTypeInListFromRef(...)
- Game.FindClosestReferenceOfType(...)
- Game.FindClosestReferenceOfTypeFromRef(...)
- Game.FindRandomReferenceOfAnyTypeInList(...)
- Game.FindRandomReferenceOfType(...)
- Game.FindRandomReferenceOfTypeFromRef(...)
Additional References
View this function’s page on the Fallout 4 Creation Kit Wiki
