Background for Fallout 4
Member of the Game script
ActorfunctionFindRandomActorFromRef(ObjectReferencearCenter, floatafRadius)Global

Description

Wiki Description

Finds a random Actor within a given radius of a ObjectReference.

Documentation Comment

Finds a random actor within a given radius of a reference


Caveats

CK Wiki - Notes

  • arCenter is not included in the search and the return value will be a random actor.

Parameters

ObjectReferencearCenter

CK Wiki Description

The ObjectReference to search around

floatafRadius

CK Wiki Description

Maximum distance from center to look for an Actor


Examples

; Find a random actor near the player, limiting the search to 5 units
Actor randomActor = Game.FindRandomActorFromRef(Game.GetPlayer(), 5.0)

Auto-Generated Example

ObjectReference myObjectReference__arCenter
float myFloat__afRadius

Actor returnedValue = Game.FindRandomActorFromRef(myObjectReference__arCenter, myFloat__afRadius)

Related Pages


Additional References

View this function’s page on the Fallout 4 Creation Kit Wiki

Some data provided by the Fallout 4 Creation Kit Wiki. Licensed under the Creative Commons Attribution-Share Alike 4.0 license.