Currently, it appears that GetUnitHealth (and <-UID.unitHealth, etc) returns only the initial health for Emergent ("unit health"). Setting the minimum health of emergent in the editor to a higher (or lower) value will get that same higher/lower initial value returned, regardless of the Emergent's actual current damage/size ("demonstrated health"). Furthermore, SetUnitHealth (and ->UID.unitHealth) do not change the demonstrated health of the particle, though they change the unit health. It otherwise causes no change in the behaviour, durability or size of the Emergent.
Or is there another hidden set of undocumented commands that set/get health exclusively for Emergent units?
Could be that Emergent, being based on a virtual particle, need a GetParticleHealth call.
Quote from: GoodMorning on October 31, 2017, 04:55:52 PM
Could be that Emergent, being based on a virtual particle, need a GetParticleHealth call.
Is there a way to get the virtual PID from a
specific unit/UID
without using any targeting commands that might not return the right thing?
Not that I know of.
However, using a range of 0 and the pixel coords of the Emergent in question for a targeting command is one of the most reliable ways.