manCount

Modders can post their questions on scripting and more.

Moderators: Slitherine Core, BA Moderators

Post Reply
enric
Brigadier-General - 8.8 cm Pak 43/41
Brigadier-General - 8.8 cm Pak 43/41
Posts: 1854
Joined: Sun May 15, 2011 8:47 am

manCount

Post by enric » Fri Aug 15, 2014 7:06 am

In the list of my weaknesses and shortages is to try to understand, and BA allow me to practice.
For example:

There is a function in BA that return the original men in a unit (if I understand well):
GetUnitMen(id)

But there is also another that do the exactly the same, and both need the same parameter: the unit id.
GetBaseAttrib (id, "manCount")

is there a purpose, or any other thing I'm missing?

pipfromslitherine
Site Admin
Site Admin
Posts: 8952
Joined: Wed Mar 23, 2005 10:35 pm

Re: manCount

Post by pipfromslitherine » Fri Aug 15, 2014 3:38 pm

One is simply a shortcut for the other. That said, it is possible in the code (though not sure if it ever happens) to create a unit with a number of men different to the squads definition, so using GetUnitMen will always be correct, where the attrib version could in theory be wrong :)

Cheers

Pip
follow me on Twitter here

Post Reply

Return to “Battle Academy : Modders Corner ”