Radar
sensor asks about a particular block or unit the program already holds in a variable.
A radar answers a different question: who is nearby.
radar enemy any any distance duo1 1 aimIt finds exactly one — the “best” by the chosen measure — and only a unit: a radar does not see buildings at all.
Lessons
Section titled “Lessons”- Finding a unitThree conditions are joined by a logical AND, and the range is taken from the block you look from
- Sorting and the cacheA radar answers not «who is there» but «who is best». And it does not answer afresh every time
What you need first
Section titled “What you need first”«Properties of units» — what to ask the one you found, and «Links and getlink» — so there is something to look from.
Unofficial fan project, not affiliated with Anuke. Mindustry sprites, fonts and translations © Anuke, used under GPL-3.0; Fira Code under OFL-1.1. Site code is GPL-3.0.