
# -> Randomized position
spreadplayers ~ ~ 64 128 false @s

# -> Add to iterations
scoreboard players add #or.recursive_iterations OverlyRealistic.General.ArbitraryData 1

# -> If iteration has surpassed max then return and set iteration to -1
execute if score #or.recursive_iterations OverlyRealistic.General.ArbitraryData matches 20.. run \
    return run scoreboard players set #or.recursive_iterations OverlyRealistic.General.ArbitraryData -1

# -> If player is nearby then loop
execute at @s \
    if entity @p[distance=..24] run \
        function overly_realistic:general/random_events/random_event_global/get_location
