Page 1 of 1

To know how may men. GetUnitMen?

Posted: Mon Aug 17, 2015 8:19 am
by ElMinotauro
Hi,

How could i to use the live men of a unit during the game?
i have tried with GetUnitMen(id) but it didn´t work (i suposse that i made a mistake)
For exambple

If (GetUnitMen(id) < 300)
{
SetTeamAggression(side,team,aggr);
}

Kind regards
ElMinotauro

Re: To know how may men. GetUnitMen?

Posted: Mon Aug 17, 2015 8:53 am
by rbodleyscott
ElMinotauro wrote:Hi,

How could i to use the live men of a unit during the game?
i have tried with GetUnitMen(id) but it didn´t work (i suposse that i made a mistake)
For exambple

If (GetUnitMen(id) < 300)
{
SetTeamAggression(side,team,aggr);
}

Kind regards
ElMinotauro
GetUnitMen() is a Battle Academy function which is not used in Pike & Shot, because the "men" referred to are the 5 (or whatever) models in a BA squad. We had to bipass this function in P&S because the units only have 1 model and up to 2000 men.

You need

GetAttrib(id, "TotalMen")

Re: To know how may men. GetUnitMen?

Posted: Mon Aug 17, 2015 9:14 am
by ElMinotauro
Hi,

ok
Thank you

Bye