The builder manager of my fledgling AI thinks that in BA, a corlab can assist nearby construction because canAssist is true, and buildDistance is 128.
Yet I know the UI doesn't allow ordering a corlab to assist construction.
Is the corlab able to assist construction? If not, how can I reliably determine that a unit can assist construction without hardcoding mod-specific knowledge?
I am using the Java interface.
BTW, is there some documentation of what exactly the attributes in UnitDef mean? (Most of them don't have any javadoc ...)
Joined: 22 Feb 2006, 01:02 Location: cheap kitchen
canAssist = true on the lab seems like a modmakers mistake, afaik factories can never assist, ony be assisted. (is that the reason why nano towers are units and not buildings?) I think buildDistance has no effect on factories either.
There are many cases like that, ie a unit might have isTransport = true but ingame it will not be a useable transport unless it has some other tags such as TransportCapacity set.
Thanks for the links Knorke, they already proved helpful in another matter
I am not sure I understand your distinction between units and buildings though. How does the engine know whether a UnitDef represents a "building" or a "unit"?
Building does not have movedef (UnitDef->movedata == NULL). But for example NOTA mod has movable defences: Hatrack (armmllt). It HAS movedef but max velocity is 0.001.
Joined: 17 Nov 2005, 02:43 Location: Raegquitting Spring on 04/24/12
Yar, I forgot about the obvious fact that a building won't have a movedef.
Does spring round maxvelocity=0, up to 0.1?Another way to do it would be to give the nanotower a massive footprint and 0 crushstrength so that it can't path anywhere.
Users browsing this forum: No registered users and 0 guests
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum