FindRandomReferenceOfTypeFromRef - Game

Revision as of 08:53, 13 January 2014 by imported>Chesko
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Member of: Game Script

Finds a random reference of the given type from the center of the target reference and within the given radius.

SyntaxEdit

ObjectReference Function FindRandomReferenceOfTypeFromRef(Form arBaseObject, ObjectReference arCenter, float afRadius) global

ParametersEdit

  • arBaseObject: The type of base object to look for
  • arCenter: The reference to use as the center of the search
  • afRadius: Maximum distance from center to look for a reference

Return ValueEdit

A random reference of that type within the radius, none if none was found.

ExamplesEdit

; Find a random diamond reference near the player, limiting the search to 5 units
ObjectReference randomDiamond = Game.FindRandomReferenceOfTypeFromRef(Diamond, Game.GetPlayer(), 5.0)

See AlsoEdit