User Tools

Site Tools


prpl:getunitisenemy

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
prpl:getunitisenemy [2016/12/02 23:34] – external edit 127.0.0.1prpl: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 ===
-<code></code>+Destroy all enemies, forcing a victory. 
 +<code> 
 +0 0 9999 TRUE GetAllUnitsInRange ->units 
 +<-units GetListCount 0 do 
 +    <-units[I] ->unit 
 +     
 +    <-unit Self neq <-unit GetUnitIsEnemy and if 
 +        <-unit 0 DestroyUnit 
 +    endif 
 +loop 
 + 
 +Self 0 DestroyUnit 
 +</code>
  
prpl/getunitisenemy.1480721648.txt.gz · Last modified: 2025/02/14 14:56 (external edit)