FindRandomActorFromRef - Game
Revision as of 03:49, 2 September 2021 by imported>Scrivener07
Member of: Game Script
Finds a random actor within a given radius of a reference.
Syntax
Actor Function FindRandomActorFromRef(ObjectReference arCenter, float afRadius) global
Parameters
- arCenter: The reference to search around
- afRadius: Maximum distance from center to look for an actor
Return Value
A random actor found, none if no actor in the area.
Examples
; Find a random actor near the player, limiting the search to 5 units
Actor randomActor = Game.FindRandomActorFromRef(Game.GetPlayer(), 5.0)
Notes
- arCenter is not included in the search and the return value will be a random actor.