This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| crpl:docs:getallunitsinrange [2018/05/01 23:47] – add more code examples Grabz | crpl:docs:getallunitsinrange [2025/02/14 14:57] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ~~DISCUSSION~~ | + | |
| <- [[crpl: | <- [[crpl: | ||
| ===== GetAllUnitsInRange | ===== GetAllUnitsInRange | ||
| + | (or GAUIR) | ||
| ^Arguments^Result^Notation^ | ^Arguments^Result^Notation^ | ||
| Line 8: | Line 9: | ||
| === Description === | === Description === | ||
| + | |||
| Returns the unit UID's of all units (including player/ | Returns the unit UID's of all units (including player/ | ||
| Line 50: | Line 52: | ||
| <-unit < | <-unit < | ||
| loop | loop | ||
| + | </ | ||
| + | |||
| + | ---- | ||
| + | |||
| + | After 10 seconds, on coordinates (50, 50), if there is an Emitter there, destroy it, even if there are multiple units occupying that cell. | ||
| + | |||
| + | < | ||
| + | once | ||
| + | 300 SetTimer0 | ||
| + | endonce | ||
| + | |||
| + | GetTimer0 eq0 if | ||
| + | once | ||
| + | 50 50 0 TRUE GetAllUnitsInRange 0 do | ||
| + | -> | ||
| + | |||
| + | < | ||
| + | < | ||
| + | < | ||
| + | endif | ||
| + | loop | ||
| + | endonce | ||
| + | endif | ||
| </ | </ | ||