[Bug] Emergent current health not accessible via [G/S]etUnitHealth or variants

Started by GameGibu, October 31, 2017, 04:44:54 PM

Previous topic - Next topic

GameGibu

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?
Bringing you Custom maps since 2971!
☆CRPL Master☆

GoodMorning

Could be that Emergent, being based on a virtual particle, need a GetParticleHealth call.
A narrative is a lightly-marked path to another reality.

GameGibu

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?
Bringing you Custom maps since 2971!
☆CRPL Master☆

GoodMorning

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.
A narrative is a lightly-marked path to another reality.