Skip to content

Instantly share code, notes, and snippets.

View MiklosMatyas's full-sized avatar

Miklos Matyas MiklosMatyas

View GitHub Profile
@MiklosMatyas
MiklosMatyas / get_closest_player.verse
Created May 19, 2024 17:46 — forked from WahlbeckUEFN/get_closest_player.verse
Get closest player to prop in UEFN and Verse
using { /Fortnite.com/Devices }
using { /Fortnite.com/Characters }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
using { /UnrealEngine.com/Temporary/SpatialMath }
GetClosestPlayerToProp(AllPlayers: []fort_character, Prop : creative_prop): ?fort_character =
var ClosestPlayer : ?fort_character = false
var ClosestDistance: float = 1000000000.0 # initialize with a large number
for (Player : AllPlayers):