<- PRPL reference <- Everything Else 2

GETUNITISENEMY

ArgumentsResultNotation
Unit UID Whether the unit is an enemy [ i1 - b1 ]

Description

Returns whether or not the provided unit is an enemy.

Examples

Destroy all enemies, forcing a victory.

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