Sort_Distance

Category: Objects/Search
Since engine version: 9.9.9.9 LC

Description

The Sort_Distance function is used to sort search results from FindObjects. It sorts by distance to the (object-local) point x/y.

Syntax

array Sort_Distance (int x, int y);

Parameters

x:
The horizontal coordinate.
y:
The vertical coordinate.

Example

  // Nach geeigneten Lebewesen suchen
var pLiving = FindObject2(Sort_Distance(),Find_AtPoint(),Find_Or(Find_OCF(OCF_Alive),Find_Func("IsHorse")),
Find_NoContainer(),Find_Not(TrapIgnoreTargets()));
Hier könnte Ihre Funktionsbeschreibung stehen
See also: FindObject, FindObject2, FindObjects, Sort_Func, Sort_Mass, Sort_Multiple, Sort_Random, Sort_Reverse, Sort_Speed, Sort_Value
Fulgen, 13th August 2016
DerTod, 10th October 2019