chooseProduction

Lplate

Esus (Allegedly)
Joined
Feb 8, 2011
Messages
578
Location
Ireland
Hi,

Can someone give an example of how to use chooseProduction(UnitType, BuildingType, ProjectType, bool, bool) in python?

In my mod, I want to create a popup to remind the player to select what they want a city to produce, with suggestions based on how many hammers have already been spent on the training/building.

thanks
 
I found it on a BtS API list. If I'm mistaken in thinking that it's available in python, then I could shelve this idea for now.
 
You can call it just fine, I expect. Try it.

From a quick look at the code for the recent thread when someone was trying to use it for the AI I learned something you should know:

You can only specify one of the 3 things (well, usefully anyway). If you specify a unit it will use the unit and ignore the other two. If you want to specify a building you need to set the unit to -1 (and it will ignore the project). If you want to specify a project you need to set the unit and building to -1.
 
You can only specify one of the 3 things (well, usefully anyway). If you specify a unit it will use the unit and ignore the other two. If you want to specify a building you need to set the unit to -1 (and it will ignore the project). If you want to specify a project you need to set the unit and building to -1.

Thanks, I thought it would be something like that.
 
Back
Top Bottom