Page 1 of 1

Jednostka podchodzi do innej jednostki jeżeli jest najbliżej

Posted: Fri Jan 07, 2011 11:54 pm
by MacGyver
Witam
Mam pytanie
Czy zna taki kod

Mam grupe jednostek ( z identami) Chce aby jednostka która jest najbliżej innej jednostki ( z identem) do niej podeszła

Za pomoc z góry thx

Re: Jednostka podchodzi do innej jednostki jeżeli jest najbl

Posted: Sat Jan 08, 2011 12:07 am
by Incantatoris
spróbuj to: GetUnitsNearUnit(Units, Unit)

Re: Jednostka podchodzi do innej jednostki jeżeli jest najbl

Posted: Sat Jan 08, 2011 12:11 am
by Gothuk
Tak ciężko spojrzeć do listy funkcji SAIL'a...
NearestUnitToUnit(units:plist un:integer)
Returns nearest unit from list units to unit un (ignoring un itself), or zero

Code: Select all

ComMoveUnit(NearestUnitToUnit(units,un), un);