This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
prpl:getunitisenemy [2016/12/02 23:34] – external edit 127.0.0.1 | prpl:getunitisenemy [2025/02/14 14:57] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 4: | Line 4: | ||
^Arguments^Result^Notation^ | ^Arguments^Result^Notation^ | ||
- | | | | [ - ] | | + | | Unit UID | Whether the unit is an enemy | [ i1 - b1 ] | |
=== Description === | === Description === | ||
+ | Returns whether or not the provided unit is an enemy. | ||
=== Examples === | === Examples === | ||
- | < | + | Destroy all enemies, forcing a victory. |
+ | < | ||
+ | 0 0 9999 TRUE GetAllUnitsInRange -> | ||
+ | <-units GetListCount 0 do | ||
+ | < | ||
+ | |||
+ | <-unit Self neq <-unit GetUnitIsEnemy and if | ||
+ | <-unit 0 DestroyUnit | ||
+ | endif | ||
+ | loop | ||
+ | |||
+ | Self 0 DestroyUnit | ||
+ | </ | ||