FindRandomReferenceOfTypeFromRef - Game: Difference between revisions

Jump to navigation Jump to search
m
Convert source tags to syntaxhighlight
imported>Chesko
No edit summary
m (Convert source tags to syntaxhighlight)
 
Line 6: Line 6:


== Syntax ==
== Syntax ==
<source lang="papyrus">
<syntaxhighlight lang="papyrus">
ObjectReference Function FindRandomReferenceOfTypeFromRef(Form arBaseObject, ObjectReference arCenter, float afRadius) global
ObjectReference Function FindRandomReferenceOfTypeFromRef(Form arBaseObject, ObjectReference arCenter, float afRadius) global
</source>
</syntaxhighlight>


== Parameters ==
== Parameters ==
Line 19: Line 19:


== Examples ==
== Examples ==
<source lang="papyrus">
<syntaxhighlight lang="papyrus">
; Find a random diamond reference near the player, limiting the search to 5 units
; Find a random diamond reference near the player, limiting the search to 5 units
ObjectReference randomDiamond = Game.FindRandomReferenceOfTypeFromRef(Diamond, Game.GetPlayer(), 5.0)
ObjectReference randomDiamond = Game.FindRandomReferenceOfTypeFromRef(Diamond, Game.GetPlayer(), 5.0)
</source>
</syntaxhighlight>


== See Also ==
== See Also ==

Navigation menu