Author Topic: [Bug] Emergent current health not accessible via [G/S]etUnitHealth or variants  (Read 96 times)

GameGibu

  • Full Member
  • ***
  • Posts: 267
  • Last place, every time.
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

  • Map Maker
  • *****
  • Posts: 2992
  • (Pusillanimous)
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

  • Full Member
  • ***
  • Posts: 267
  • Last place, every time.
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

  • Map Maker
  • *****
  • Posts: 2992
  • (Pusillanimous)
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.