Hi everyone, I have the BossHP plugins for Zombie Escape and its interface is kind the old because it only shows the name of entity and health remain. So I decide to add HP bar text feature.
but ended up struggling to try to make the hp bar in the boss and realized later that I need to get Max Health of the boss. in order to make an HPbar text.
For Breakable entity, it's simple
PHP Code:
iHealth = GetEntProp(iBreakableEnt, Prop_Data, "m_iHealth");
iMaxHealth = GetEntProp(iBreakableEnt, Prop_Data, "m_iMaxHealth");
But when I start working on the boss that using math_counter method
PHP Code:
int iCounterVal = RoundFloat(GetOutputValueFloat(iCounterEnt, "m_OutValue"));
if(!IsCounterReverse)
{
int iCounterMin = RoundFloat(GetEntPropFloat(iCounterEnt, Prop_Data, "m_flMin"));
iHealth = iCounterVal - iCounterMin;
}
else
{
int iCounterMax = RoundFloat(GetEntPropFloat(iCounterEnt, Prop_Data, "m_flMax"));
iHealth = iCounterMax - iCounterVal;
}
I just simply don't know how to create max health for this one. since m_OutValue will always get the current value. and I'm not sure that if m_GetValue will work with it.