To know how may men. GetUnitMen?

Moderators: rbodleyscott, Slitherine Core, Gothic Labs

Post Reply
ElMinotauro
Lance Corporal - SdKfz 222
Lance Corporal - SdKfz 222
Posts: 23
Joined: Sun Jun 14, 2015 11:02 pm

To know how may men. GetUnitMen?

Post 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
rbodleyscott
Field of Glory 2
Field of Glory 2
Posts: 28274
Joined: Sun Dec 04, 2005 6:25 pm

Re: To know how may men. GetUnitMen?

Post 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")
Richard Bodley Scott

Image
ElMinotauro
Lance Corporal - SdKfz 222
Lance Corporal - SdKfz 222
Posts: 23
Joined: Sun Jun 14, 2015 11:02 pm

Re: To know how may men. GetUnitMen?

Post by ElMinotauro »

Hi,

ok
Thank you

Bye
Post Reply

Return to “Scenario Design”