Is it possible to handle omnis in PRPL? Namely, I'm looking for
- get list of built omnis
- get position
- get/set health
For the first, you can do something like:
CreateList ->omnis
0 0 999 1 GetAllUnitsInRange ->units
<-units GetListCount 0 do
<-units[I] GetUnitType "Omni" eq if
<-omnis <-units[I] AppendToList
endif
loop
For all units, you can use GetUnitCoordX GetUnitCoordY GetUnitPixelCoordX GetUnitPixelCoordY GetUnitHealth and the 'set' equivalents.
Thanks.
SetUnitHealth on an omni seems to work only when the omni is on ground. Is this intended?