Knuckle Cracker

Particle Fleet => Map Makers, Ship Builders, and Coders => Topic started by: Praetonus on October 01, 2016, 07:59:35 PM

Title: [PRPL] Omnis API
Post by: Praetonus on October 01, 2016, 07:59:35 PM
Is it possible to handle omnis in PRPL? Namely, I'm looking for
Title: Re: [PRPL] Omnis API
Post by: planetfall on October 01, 2016, 08:26:59 PM
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.
Title: Re: [PRPL] Omnis API
Post by: Praetonus on October 01, 2016, 08:42:37 PM
Thanks.
Title: Re: [PRPL] Omnis API
Post by: Praetonus on October 01, 2016, 09:19:17 PM
SetUnitHealth on an omni seems to work only when the omni is on ground. Is this intended?